Author: hpoussin
Date: Sun Dec 28 22:15:08 2014
New Revision: 65865
URL:
http://svn.reactos.org/svn/reactos?rev=65865&view=rev
Log:
[WHOAMI] Better error message when we're unable to find the logon SID
Modified:
trunk/reactos/base/applications/cmdutils/whoami/whoami.c
Modified: trunk/reactos/base/applications/cmdutils/whoami/whoami.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/whoami/whoami.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/cmdutils/whoami/whoami.c [iso-8859-1] Sun Dec 28
22:15:08 2014
@@ -386,7 +386,13 @@
}
}
- if (pSid == 0 || !ConvertSidToStringSidW(pSid, &pSidStr))
+ if (pSid == 0)
+ {
+ WhoamiFree(pGroupInfo);
+ wprintf(L"ERROR: Couldn't find the logon SID.\n");
+ return 1;
+ }
+ if (!ConvertSidToStringSidW(pSid, &pSidStr))
{
WhoamiFree(pGroupInfo);
wprintf(L"ERROR: Couldn't convert the logon SID to a string.\n");