Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
-#define _WIN32_WINNT 0x0600
+#define _WIN32_WINNT 0x0a00
#include <errno.h>
#include <ctype.h>
#include <stdlib.h>
else if (acc_type == SidTypeDomain)
{
WCHAR domname[MAX_DOMAIN_NAME_LEN + UNLEN + 2];
+ PWCHAR p;
- wcscpy (domname, machine);
- wcscat (domname, L"\\");
- wcscat (domname, buffer[i].usri3_name);
+ p = wcpcpy (domname, machine);
+ p = wcpcpy (p, L"\\");
+ p = wcpncpy (p, buffer[i].usri3_name, UNLEN);
+ *p = L'\0';
sid_length = SECURITY_MAX_SID_SIZE;
domname_len = sizeof (domname);
if (!LookupAccountNameW (machine, domname, psid,
return 0;
}
-static int
+static int __attribute__ ((__noreturn__))
usage (FILE * stream)
{
fprintf (stream,
"on domain controllers and domain member machines.\n"
"\n", program_invocation_short_name,
(const char *) cygwin_internal (CW_GETNSSSEP));
- return 1;
+ exit (stream == stdout ? 0 : 1);
}
static struct option longopts[] = {
break;
case 'h':
usage (stdout);
- return 0;
case 'V':
print_version ();
return 0;