Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ConvertSidToStringSid() Function not present

210 views
Skip to first unread message

Justin Dearing

unread,
Jun 12, 2004, 6:59:49 AM6/12/04
to
Hello,

It seems their no header stub or library entry for
ConvertSidToStringSid(). I'm using watcom 1.2. Errors are below. I also
grepped the headers for the function stub and no dice.

________________________________
cd Z:\SoftwareProjects\graveyardAutomation\watcom
wmake -f Z:\SoftwareProjects\graveyardAutomation\watcom\listACLS.mk -h
-e Z:\SoftwareProjects\graveyardAutomation\watcom\listACLS.exe
wlink name listACLS d all op inc SYS nt op m op maxe=25 op q op symf
@listACLS.lk1
Error! E2028: ConvertSidToStringSid_ is an undefined reference
file
listacls.obj(Z:\SoftwareProjects\graveyardAutomation\ACL\listacls.c):
undefined symbol ConvertSidToStringSid_
Error(E42): Last command making
(Z:\SoftwareProjects\graveyardAutomation\watcom\listACLS.exe) returned a
bad status
Error(E02): Make execution terminated
Execution complete

Carl Young

unread,
Jun 12, 2004, 9:03:40 AM6/12/04
to

"Justin Dearing" <zipp...@nyc.rr.com> wrote in message
news:caenp0$1oq$1...@www1.scitechsoft.com...

> Hello,
>
> It seems their no header stub or library entry for
> ConvertSidToStringSid(). I'm using watcom 1.2. Errors are below. I also
> grepped the headers for the function stub and no dice.
>

This is a W2K and later only API so doesn't appear to have made into W32API
yet.

Just define your own. This will probably do the job:

#if(_WIN32_WINNT < 0x0500)

typedef BOOL (WINAPI *PConvertSidToStringSid)(PSID, LPTSTR *);

#ifdef UNICODE
#define ConvertSidToStringSid ConvertSidToStringSidW
#define IMPORT_NAME "ConvertSidToStringSidW"
#else
#define ConvertSidToStringSid ConvertSidToStringSidA
#define IMPORT_NAME "ConvertSidToStringSidA"
#endif

BOOL ConvertSidToStringSid(PSID sid, LPTSTR *str)
{
static PConvertSidToStringSid pSidFn = NULL;
if(NULL == pSidFn){
HMODULE hLib = LoadLibrary(_T("ADVAPI32.DLL"));
if(hLib){
pSidFn = (PConvertSidToStringSid)GetProcAddress(hLib,
IMPORT_NAME);
}
}
if(pSidFn){
return(pSidFn(sid, str));
}
return FALSE;
}
#endif

Justin Dearing

unread,
Jun 12, 2004, 9:11:02 AM6/12/04
to
Carl Young wrote:

> "Justin Dearing" <zipp...@nyc.rr.com> wrote in message
> news:caenp0$1oq$1...@www1.scitechsoft.com...
>
>>Hello,
>>
>>It seems their no header stub or library entry for
>>ConvertSidToStringSid(). I'm using watcom 1.2. Errors are below. I also
>>grepped the headers for the function stub and no dice.
>>

Thanks Carl,
Thats not good news to hear being I'm using this program to audit ACLS
on some old NT4 servers. Oh well I'll figure out another way to deal
with orphaned SIDs.

Carl Young

unread,
Jun 12, 2004, 9:50:30 AM6/12/04
to

"Justin Dearing" <zipp...@nyc.rr.com> wrote in message
news:40CB00E6...@nyc.rr.com...

> Carl Young wrote:
> Thanks Carl,
> Thats not good news to hear being I'm using this program to audit ACLS
> on some old NT4 servers. Oh well I'll figure out another way to deal
> with orphaned SIDs.

All this function does is convert binary SIDs to their textual
representation - it doesn't do anything particularly useful.

Carl


Justin Dearing

unread,
Jun 13, 2004, 11:31:02 AM6/13/04
to
Carl Young wrote:

> "Justin Dearing" <zipp...@nyc.rr.com> wrote in message
> news:caenp0$1oq$1...@www1.scitechsoft.com...
>
>>Hello,
>>
>>It seems their no header stub or library entry for
>>ConvertSidToStringSid(). I'm using watcom 1.2. Errors are below. I also
>>grepped the headers for the function stub and no dice.
>>

Thanks Carl,
Thats not good news to hear being I'm using this program to audit ACLS
on some old NT4 servers. Oh well I'll figure out another way to deal
with orphaned SIDs.

>


>

Justin Dearing

unread,
Jun 13, 2004, 11:40:55 AM6/13/04
to

>
> All this function does is convert binary SIDs to their textual
> representation - it doesn't do anything particularly useful.
>
> Carl
>
>
Well I guess if the report says unknown SID, it would be just as useful
as printing out the SID. I could alwyas implement the function my self
as well. I don't care about SIDs of deleted users in thhe case, but in
theory it could be useful.

Justin Dearing

unread,
Jun 13, 2004, 11:41:47 AM6/13/04
to
Justin Dearing wrote:

Sorry for sending twice. The news admin can delete this message.

0 new messages