You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by "William A. Rowe, Jr." <wr...@rowe-clan.net> on 2001/07/27 07:56:34 UTC
userid is _NOT_ this...
rv = apr_get_userid(&userid, &groupid, username, p);
if (rv != APR_SUCCESS) {
fprintf(stderr, "apr_get_userid(,,%s,) failed: %s\n",
username,
apr_strerror(rv, msgbuf, sizeof(msgbuf)));
exit(-1);
}
else {
printf("user/group ids for %s: %d/%d\n",
username,
(int)userid, (int)groupid);
}
guys ... userid isn't!!! This is a really cruddy example. If you want to
create an apr_strfuid to display for the user, then _fine_! But we need to
kill this example, which I will go ahead a do by the weekend if nobody wants
to salvage this. BTW, we should simply pass a pool and let the apr_strfuid
allocate what it needs, on win32 these can grow to about, well, a very long
number, such as S-1-5-21-527223456-839523456-1060223456-502
The code to format a sid is already in apr/user/win32/userinfo.c and I won't
object to it becoming public (with the usual name.)
Bill
SID library (was: userid is _NOT_ this...)
Posted by Luke Kenneth Casson Leighton <lk...@samba-tng.org>.
On Fri, Jul 27, 2001 at 12:56:34AM -0500, William A. Rowe, Jr. wrote:
> The code to format a sid is already in apr/user/win32/userinfo.c and I won't
> object to it becoming public (with the usual name.)
i have been meaning to create a SID-manipulating library, if
anyone's interested. we have to have SID construct / destruct
code for TNG, and it's the sort of self-contained thing that
could be libratised v. easily.
luke