* mkpasswd.cc (current_user): Create.
(usage): Reorganize to support Win95/98/ME. (main): Add option for -c. Reorganize to parse options for Win95/98/ME and to call current_user. Add username in gecos field on Win95/98/ME. * mkgroup.cc (enum_groups): Print gid with %u. (print_win_error): Create from passwd.cc. (current_group): Create. (usage): Reorganize to support Win95/98/ME. (main): Add option for -c. Reorganize to parse options for Win95/98/ME and to call current_group.
This commit is contained in:
		
							parent
							
								
									afa53b05b0
								
							
						
					
					
						commit
						f1c9046a57
					
				|  | @ -1,3 +1,17 @@ | |||
| 2003-01-07  Pierre Humblet <pierre.humblet@ieee.org> | ||||
| 
 | ||||
| 	* mkpasswd.cc (current_user): Create. | ||||
| 	(usage): Reorganize to support Win95/98/ME. | ||||
| 	(main): Add option for -c. Reorganize to parse options for | ||||
| 	Win95/98/ME and to call current_user. Add username in gecos field | ||||
| 	on Win95/98/ME. | ||||
| 	* mkgroup.cc (enum_groups): Print gid with %u. | ||||
| 	(print_win_error): Create from passwd.cc.   | ||||
| 	(current_group): Create. | ||||
| 	(usage): Reorganize to support Win95/98/ME. | ||||
| 	(main): Add option for -c. Reorganize to parse options for | ||||
| 	Win95/98/ME and to call current_group.    | ||||
| 
 | ||||
| 2002-12-14  Pierre Humblet <pierre.humblet@ieee.org> | ||||
| 
 | ||||
| 	* setfacl.c (main): Place a single : after other and mask. | ||||
|  |  | |||
|  | @ -360,7 +360,7 @@ enum_groups (LPWSTR servername, int print_sids, int print_users, int id_offset) | |||
|                     } | ||||
|                 } | ||||
|             } | ||||
| 	  printf ("%s:%s:%d:", groupname, | ||||
| 	  printf ("%s:%s:%u:", groupname, | ||||
|                                print_sids ? put_sid (psid) : "", | ||||
|                                gid + id_offset); | ||||
| 	  if (print_users) | ||||
|  | @ -420,13 +420,76 @@ print_special (int print_sids, | |||
|     } | ||||
| } | ||||
| 
 | ||||
| void | ||||
| print_win_error(DWORD code) | ||||
| { | ||||
|   char buf[4096]; | ||||
| 
 | ||||
|   if (FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM | ||||
|       | FORMAT_MESSAGE_IGNORE_INSERTS, | ||||
|       NULL, | ||||
|       code, | ||||
|       MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), | ||||
|       (LPTSTR) buf, sizeof (buf), NULL)) | ||||
|     fprintf (stderr, "mkgroup: [%lu] %s", code, buf); | ||||
|   else | ||||
|     fprintf (stderr, "mkgroup: error %lu", code); | ||||
| } | ||||
| 
 | ||||
| void | ||||
| current_group (int print_sids, int print_users, int id_offset) | ||||
| { | ||||
|   char name[UNLEN + 1], *envname, *envdomain; | ||||
|   DWORD len; | ||||
|   HANDLE ptok; | ||||
|   int errpos = 0; | ||||
|   struct { | ||||
|     PSID psid; | ||||
|     int buffer[10]; | ||||
|   } tg; | ||||
| 
 | ||||
| 
 | ||||
|   if ((!GetUserName (name, (len = sizeof (name), &len)) && (errpos = __LINE__)) | ||||
|       || !name[0] | ||||
|       || !(envname = getenv("USERNAME")) | ||||
|       || strcasecmp (envname, name) | ||||
|       || (!GetComputerName (name, (len = sizeof (name), &len)) | ||||
| 	  && (errpos = __LINE__)) | ||||
|       || !(envdomain = getenv("USERDOMAIN")) | ||||
|       || !envdomain[0] | ||||
|       || !strcasecmp (envdomain, name) | ||||
|       || (!OpenProcessToken (GetCurrentProcess (), TOKEN_QUERY, &ptok) | ||||
| 	  && (errpos = __LINE__)) | ||||
|       || (!GetTokenInformation (ptok, TokenPrimaryGroup, &tg, sizeof tg, &len) | ||||
| 	  && (errpos = __LINE__)) | ||||
|       || (!CloseHandle (ptok) && (errpos = __LINE__))) | ||||
|     { | ||||
|       if (errpos) | ||||
| 	{ | ||||
| 	  print_win_error (GetLastError ()); | ||||
| 	  fprintf(stderr, " on line %d\n", errpos); | ||||
| 	} | ||||
|       return; | ||||
|     } | ||||
| 
 | ||||
|   int gid = *GetSidSubAuthority (tg.psid, *GetSidSubAuthorityCount(tg.psid) - 1); | ||||
| 
 | ||||
|   printf ("mkgroup_l_d:%s:%u:", print_sids ? put_sid (tg.psid) : "", | ||||
|                                 gid + id_offset); | ||||
|   if (print_users) | ||||
|     printf("%s", envname); | ||||
|   printf ("\n"); | ||||
| } | ||||
| 
 | ||||
| int | ||||
| usage (FILE * stream, int status) | ||||
| usage (FILE * stream, int isNT) | ||||
| { | ||||
|   fprintf (stream, "Usage: mkgroup [OPTION]... [domain]\n\n" | ||||
| 	           "This program prints a /etc/group file to stdout\n\n" | ||||
| 		   "Options:\n" | ||||
| 		   "   -l,--local             print local group information\n" | ||||
| 	           "Options:\n"); | ||||
|   if (isNT) | ||||
|     fprintf (stream, "   -l,--local             print local group information\n" | ||||
| 	             "   -c,--current           print current group, if a domain account\n" | ||||
| 		     "   -d,--domain            print global group information from the domain\n" | ||||
| 		     "                          specified (or from the current domain if there is\n" | ||||
| 		     "                          no domain specified)\n" | ||||
|  | @ -434,15 +497,18 @@ usage (FILE * stream, int status) | |||
| 		     "                          in domain accounts.\n" | ||||
| 		     "   -s,--no-sids           don't print SIDs in pwd field\n" | ||||
| 		     "                          (this affects ntsec)\n" | ||||
| 		   "   -u,--users             print user list in gr_mem field\n" | ||||
| 		   "   -h,--help              print this message\n\n" | ||||
| 		   "   -v,--version           print version information and exit\n\n" | ||||
| 		   "One of `-l' or `-d' must be given on NT/W2K.\n"); | ||||
|   return status; | ||||
| 	             "   -u,--users             print user list in gr_mem field\n"); | ||||
|   fprintf (stream, "   -h,--help              print this message\n" | ||||
| 	           "   -v,--version           print version information and exit\n\n"); | ||||
|   if (isNT) | ||||
|     fprintf (stream, "One of `-l' or `-d' must be given.\n"); | ||||
| 
 | ||||
|   return 1; | ||||
| } | ||||
| 
 | ||||
| struct option longopts[] = { | ||||
|   {"local", no_argument, NULL, 'l'}, | ||||
|   {"current", no_argument, NULL, 'c'}, | ||||
|   {"domain", no_argument, NULL, 'd'}, | ||||
|   {"id-offset", required_argument, NULL, 'o'}, | ||||
|   {"no-sids", no_argument, NULL, 's'}, | ||||
|  | @ -452,7 +518,7 @@ struct option longopts[] = { | |||
|   {0, no_argument, NULL, 0} | ||||
| }; | ||||
| 
 | ||||
| char opts[] = "ldo:suhv"; | ||||
| char opts[] = "lcdo:suhv"; | ||||
| 
 | ||||
| void | ||||
| print_version () | ||||
|  | @ -484,11 +550,13 @@ main (int argc, char **argv) | |||
|   DWORD rc = ERROR_SUCCESS; | ||||
|   WCHAR domain_name[100]; | ||||
|   int print_local = 0; | ||||
|   int print_current = 0; | ||||
|   int print_domain = 0; | ||||
|   int print_sids = 1; | ||||
|   int print_users = 0; | ||||
|   int domain_specified = 0; | ||||
|   int id_offset = 10000; | ||||
|   int isNT; | ||||
|   int i; | ||||
| 
 | ||||
|   char name[256], dom[256]; | ||||
|  | @ -502,10 +570,10 @@ main (int argc, char **argv) | |||
|   NTSTATUS ret; | ||||
|   PPOLICY_PRIMARY_DOMAIN_INFO pdi; | ||||
| 
 | ||||
|   if (GetVersion () < 0x80000000) | ||||
|     { | ||||
|       if (argc == 1) | ||||
| 	return usage(stderr, 1); | ||||
|   isNT = (GetVersion () < 0x80000000); | ||||
| 
 | ||||
|   if (isNT && argc == 1) | ||||
|     return usage(stderr, isNT); | ||||
|   else | ||||
|     { | ||||
|       while ((i = getopt_long (argc, argv, opts, longopts, NULL)) != EOF) | ||||
|  | @ -514,6 +582,9 @@ main (int argc, char **argv) | |||
| 	case 'l': | ||||
| 	  print_local = 1; | ||||
| 	  break; | ||||
| 	case 'c': | ||||
| 	  print_current = 1; | ||||
| 	  break; | ||||
| 	case 'd': | ||||
| 	  print_domain = 1; | ||||
| 	  break; | ||||
|  | @ -527,7 +598,8 @@ main (int argc, char **argv) | |||
| 	  print_users = 1; | ||||
| 	  break; | ||||
| 	case 'h': | ||||
| 		return usage (stdout, 0); | ||||
| 	  usage (stdout, isNT); | ||||
| 	  return 0; | ||||
| 	case 'v': | ||||
| 	  print_version (); | ||||
| 	  return 0; | ||||
|  | @ -535,6 +607,15 @@ main (int argc, char **argv) | |||
| 	  fprintf (stderr, "Try `%s --help' for more information.\n", argv[0]); | ||||
| 	  return 1; | ||||
| 	} | ||||
|     } | ||||
| 
 | ||||
|   /* This takes Windows 9x/ME into account. */ | ||||
|   if (!isNT) | ||||
|     { | ||||
|       printf ("unknown::%ld:\n", DOMAIN_ALIAS_RID_ADMINS); | ||||
|       return 0; | ||||
|     } | ||||
| 
 | ||||
|   if (!print_local && !print_domain) | ||||
|     { | ||||
|       fprintf (stderr, "%s: Specify one of `-l' or `-d'\n", argv[0]); | ||||
|  | @ -551,16 +632,6 @@ main (int argc, char **argv) | |||
|       mbstowcs (domain_name, argv[optind], (strlen (argv[optind]) + 1)); | ||||
|       domain_specified = 1; | ||||
|     } | ||||
| 	} | ||||
|     } | ||||
| 
 | ||||
|   /* This takes Windows 9x/ME into account. */ | ||||
|   if (GetVersion () >= 0x80000000) | ||||
|     { | ||||
|       printf ("unknown::%ld:\n", DOMAIN_ALIAS_RID_ADMINS); | ||||
|       return 0; | ||||
|     } | ||||
|    | ||||
|   if (!load_netapi ()) | ||||
|     { | ||||
|       fprintf (stderr, "Failed loading symbols from netapi32.dll " | ||||
|  | @ -647,5 +718,8 @@ main (int argc, char **argv) | |||
|   if (print_local) | ||||
|     enum_local_groups (print_sids, print_users); | ||||
| 
 | ||||
|   if (print_current && !print_domain) | ||||
|     current_group (print_sids, print_users, id_offset); | ||||
| 
 | ||||
|   return 0; | ||||
| } | ||||
|  |  | |||
|  | @ -21,6 +21,7 @@ | |||
| #include <lmapibuf.h> | ||||
| #include <sys/fcntl.h> | ||||
| #include <lmerr.h> | ||||
| #include <lmcons.h> | ||||
| 
 | ||||
| static const char version[] = "$Revision$"; | ||||
| 
 | ||||
|  | @ -125,6 +126,94 @@ print_win_error(DWORD code) | |||
|     fprintf (stderr, "mkpasswd: error %lu", code); | ||||
| } | ||||
| 
 | ||||
| void | ||||
| current_user (int print_sids, int print_cygpath, | ||||
| 	      const char * passed_home_path, int id_offset, const char * disp_username) | ||||
| { | ||||
|   char name[UNLEN + 1], *envname, *envdomain; | ||||
|   DWORD len; | ||||
|   HANDLE ptok; | ||||
|   int errpos = 0; | ||||
|   struct { | ||||
|     PSID psid; | ||||
|     int buffer[10]; | ||||
|   } tu, tg; | ||||
| 
 | ||||
| 
 | ||||
|   if ((!GetUserName (name, (len = sizeof (name), &len)) && (errpos = __LINE__)) | ||||
|       || !name[0] | ||||
|       || !(envname = getenv("USERNAME")) | ||||
|       || strcasecmp (envname, name) | ||||
|       || (disp_username && strcasecmp(envname, disp_username)) | ||||
|       || (!GetComputerName (name, (len = sizeof (name), &len)) | ||||
| 	  && (errpos = __LINE__)) | ||||
|       || !(envdomain = getenv("USERDOMAIN")) | ||||
|       || !envdomain[0] | ||||
|       || !strcasecmp (envdomain, name) | ||||
|       || (!OpenProcessToken (GetCurrentProcess (), TOKEN_QUERY, &ptok) | ||||
| 	  && (errpos = __LINE__)) | ||||
|       || (!GetTokenInformation (ptok, TokenUser, &tu, sizeof tu, &len) | ||||
| 	  && (errpos = __LINE__)) | ||||
|       || (!GetTokenInformation (ptok, TokenPrimaryGroup, &tg, sizeof tg, &len) | ||||
| 	  && (errpos = __LINE__)) | ||||
|       || (!CloseHandle (ptok) && (errpos = __LINE__))) | ||||
|     { | ||||
|       if (errpos) | ||||
| 	{ | ||||
| 	  print_win_error (GetLastError ()); | ||||
| 	  fprintf(stderr, " on line %d\n", errpos); | ||||
| 	} | ||||
|       return; | ||||
|     } | ||||
| 
 | ||||
|   int uid = *GetSidSubAuthority (tu.psid, *GetSidSubAuthorityCount(tu.psid) - 1); | ||||
|   int gid = *GetSidSubAuthority (tg.psid, *GetSidSubAuthorityCount(tg.psid) - 1); | ||||
|   char homedir_psx[MAX_PATH] = {0}, homedir_w32[MAX_PATH] = {0}; | ||||
| 
 | ||||
|   char *envhomedrive = getenv ("HOMEDRIVE"); | ||||
|   char *envhomepath = getenv ("HOMEPATH"); | ||||
| 
 | ||||
|   if (passed_home_path[0] == '\0') | ||||
|     { | ||||
|       if (envhomepath && envhomepath[0]) | ||||
|         { | ||||
| 	  if (envhomedrive) | ||||
| 	    strlcpy (homedir_w32, envhomedrive, sizeof (homedir_w32)); | ||||
| 	  if (envhomepath[0] != '\\') | ||||
| 	    strlcat (homedir_w32, "\\", sizeof (homedir_w32)); | ||||
| 	  strlcat (homedir_w32, envhomepath, sizeof (homedir_w32)); | ||||
| 	  if (print_cygpath) | ||||
| 	    cygwin_conv_to_posix_path (homedir_w32, homedir_psx); | ||||
| 	  else | ||||
| 	    psx_dir (homedir_w32, homedir_psx); | ||||
| 	} | ||||
|       else | ||||
|         { | ||||
| 	  strlcpy (homedir_psx, "/home/", sizeof (homedir_psx)); | ||||
| 	  strlcat (homedir_psx, envname, sizeof (homedir_psx)); | ||||
| 	} | ||||
|     } | ||||
|   else | ||||
|     { | ||||
|       strlcpy (homedir_psx, passed_home_path, sizeof (homedir_psx)); | ||||
|       strlcat (homedir_psx, envname, sizeof (homedir_psx)); | ||||
|     } | ||||
| 
 | ||||
|   printf ("%s:unused_by_nt/2000/xp:%d:%d:%s%s%s%s%s%s%s%s:%s:/bin/bash\n", | ||||
| 	  envname, | ||||
| 	  uid + id_offset, | ||||
| 	  gid + id_offset, | ||||
| 	  envname, | ||||
| 	  print_sids ? "," : "", | ||||
| 	  print_sids ? "U-" : "", | ||||
| 	  print_sids ? envdomain : "", | ||||
| 	  print_sids ? "\\" : "", | ||||
| 	  print_sids ? envname : "", | ||||
| 	  print_sids ? "," : "", | ||||
| 	  print_sids ? put_sid (tu.psid) : "", | ||||
| 	  homedir_psx); | ||||
| } | ||||
| 
 | ||||
| int | ||||
| enum_users (LPWSTR servername, int print_sids, int print_cygpath, | ||||
| 	    const char * passed_home_path, int id_offset, char *disp_username) | ||||
|  | @ -396,12 +485,14 @@ print_special (int print_sids, | |||
| } | ||||
| 
 | ||||
| int | ||||
| usage (FILE * stream, int status) | ||||
| usage (FILE * stream, int isNT) | ||||
| { | ||||
|   fprintf (stream, "Usage: mkpasswd [OPTION]... [domain]\n\n" | ||||
| 	           "This program prints a /etc/passwd file to stdout\n\n" | ||||
|                    "Options:\n" | ||||
|                    "   -l,--local              print local user accounts\n" | ||||
| 	           "Options:\n"); | ||||
|   if (isNT) | ||||
|     fprintf (stream, "   -l,--local              print local user accounts\n" | ||||
| 	             "   -c,--current            print current account, if a domain account\n" | ||||
|                      "   -d,--domain             print domain accounts (from current domain\n" | ||||
|                      "                           if no domain specified)\n" | ||||
|                      "   -o,--id-offset offset   change the default offset (10000) added to uids\n" | ||||
|  | @ -410,17 +501,19 @@ usage (FILE * stream, int status) | |||
|                      "                           if no domain specified\n" | ||||
|                      "   -m,--no-mount           don't use mount points for home dir\n" | ||||
|                      "   -s,--no-sids            don't print SIDs in GCOS field\n" | ||||
|                    "                           (this affects ntsec)\n" | ||||
|                    "   -p,--path-to-home path  use specified path instead of user account home dir\n" | ||||
| 	             "                           (this affects ntsec)\n"); | ||||
|   fprintf (stream, "   -p,--path-to-home path  use specified path instead of user account home dir\n" | ||||
|                    "   -u,--username username  only return information for the specified user\n" | ||||
|                    "   -h,--help               displays this message\n" | ||||
|                    "   -v,--version            version information and exit\n\n" | ||||
|                    "One of `-l', `-d' or `-g' must be given on NT/W2K.\n"); | ||||
|   return status; | ||||
| 	           "   -v,--version            version information and exit\n\n"); | ||||
|   if (isNT) | ||||
|     fprintf (stream, "One of `-l', `-d' or `-g' must be given.\n"); | ||||
|   return 1; | ||||
| } | ||||
| 
 | ||||
| struct option longopts[] = { | ||||
|   {"local", no_argument, NULL, 'l'}, | ||||
|   {"current", no_argument, NULL, 'c'}, | ||||
|   {"domain", no_argument, NULL, 'd'}, | ||||
|   {"id-offset", required_argument, NULL, 'o'}, | ||||
|   {"local-groups", no_argument, NULL, 'g'}, | ||||
|  | @ -433,7 +526,7 @@ struct option longopts[] = { | |||
|   {0, no_argument, NULL, 0} | ||||
| }; | ||||
| 
 | ||||
| char opts[] = "ldo:gsmhp:u:v"; | ||||
| char opts[] = "lcdo:gsmhp:u:v"; | ||||
| 
 | ||||
| static void | ||||
| print_version () | ||||
|  | @ -465,6 +558,7 @@ main (int argc, char **argv) | |||
|   DWORD rc = ERROR_SUCCESS; | ||||
|   WCHAR domain_name[200]; | ||||
|   int print_local = 0; | ||||
|   int print_current = 0; | ||||
|   int print_domain = 0; | ||||
|   int print_local_groups = 0; | ||||
|   int domain_name_specified = 0; | ||||
|  | @ -472,19 +566,18 @@ main (int argc, char **argv) | |||
|   int print_cygpath = 1; | ||||
|   int id_offset = 10000; | ||||
|   int i; | ||||
|   int isNT; | ||||
|   char *disp_username = NULL; | ||||
| 
 | ||||
|   char name[256], passed_home_path[MAX_PATH]; | ||||
|   DWORD len; | ||||
| 
 | ||||
|   isNT = (GetVersion () < 0x80000000); | ||||
|   passed_home_path[0] = '\0'; | ||||
|   if (!isatty (1)) | ||||
|     setmode (1, O_BINARY); | ||||
| 
 | ||||
|   if (GetVersion () < 0x80000000) | ||||
|     { | ||||
|       if (argc == 1) | ||||
| 	return usage (stderr, 1); | ||||
|   if (isNT && argc == 1) | ||||
|     return usage (stderr, isNT); | ||||
|   else | ||||
|     { | ||||
|       while ((i = getopt_long (argc, argv, opts, longopts, NULL)) != EOF) | ||||
|  | @ -493,6 +586,9 @@ main (int argc, char **argv) | |||
| 	  case 'l': | ||||
| 	    print_local = 1; | ||||
| 	    break; | ||||
| 	  case 'c': | ||||
| 	    print_current = 1; | ||||
| 	    break; | ||||
| 	  case 'd': | ||||
| 	    print_domain = 1; | ||||
| 	    break; | ||||
|  | @ -523,7 +619,8 @@ main (int argc, char **argv) | |||
| 	    disp_username = optarg; | ||||
| 	    break; | ||||
| 	  case 'h': | ||||
| 		return usage (stdout, 0); | ||||
| 	    usage (stdout, isNT); | ||||
| 	    return 0; | ||||
| 	  case 'v': | ||||
| 	    print_version (); | ||||
| 	    return 0; | ||||
|  | @ -531,6 +628,30 @@ main (int argc, char **argv) | |||
| 	    fprintf (stderr, "Try `%s --help' for more information.\n", argv[0]); | ||||
| 	    return 1; | ||||
| 	  } | ||||
|     } | ||||
|   if (!isNT) | ||||
|     { | ||||
|       /* This takes Windows 9x/ME into account. */ | ||||
|       if (!disp_username) | ||||
|         { | ||||
| 	  if (GetUserName (name, (len = 256, &len))) | ||||
| 	    disp_username = name; | ||||
| 	  else | ||||
| 	    /* Same behaviour as in cygwin/shared.cc (memory_init). */ | ||||
| 	    disp_username = (char *) "unknown"; | ||||
| 	} | ||||
| 
 | ||||
|       if (passed_home_path[0] == '\0') | ||||
| 	strcpy (passed_home_path, "/home/"); | ||||
| 
 | ||||
|       printf ("%s:*:%ld:%ld:%s:%s%s:/bin/bash\n", disp_username, | ||||
| 					        DOMAIN_USER_RID_ADMIN, | ||||
| 					        DOMAIN_ALIAS_RID_ADMINS, | ||||
| 	                                        disp_username, | ||||
| 					        passed_home_path, | ||||
| 					        disp_username); | ||||
|       return 0; | ||||
|     } | ||||
|   if (!print_local && !print_domain && !print_local_groups) | ||||
|     { | ||||
|       fprintf (stderr, "%s: Specify one of `-l', `-d' or `-g'\n", argv[0]); | ||||
|  | @ -547,28 +668,6 @@ main (int argc, char **argv) | |||
|       mbstowcs (domain_name, argv[optind], (strlen (argv[optind]) + 1)); | ||||
|       domain_name_specified = 1; | ||||
|     } | ||||
| 	} | ||||
|     } | ||||
| 
 | ||||
|   /* This takes Windows 9x/ME into account. */ | ||||
|   if (GetVersion () >= 0x80000000) | ||||
|     { | ||||
|       /* Same behaviour as in cygwin/uinfo.cc (internal_getlogin). */ | ||||
|       if (!GetUserName (name, (len = 256, &len))) | ||||
| 	strcpy (name, "unknown"); | ||||
| 
 | ||||
|       if (passed_home_path[0] == '\0') | ||||
| 	strcpy (passed_home_path, "/home/"); | ||||
| 
 | ||||
|       printf ("%s:*:%ld:%ld::%s%s:/bin/bash\n", name, | ||||
| 					        DOMAIN_USER_RID_ADMIN, | ||||
| 					        DOMAIN_ALIAS_RID_ADMINS, | ||||
| 					        passed_home_path, | ||||
| 					        name); | ||||
| 
 | ||||
|       return 0; | ||||
|     } | ||||
| 
 | ||||
|   if (!load_netapi ()) | ||||
|     { | ||||
|       print_win_error(GetLastError ()); | ||||
|  | @ -622,6 +721,10 @@ main (int argc, char **argv) | |||
|     enum_users (NULL, print_sids, print_cygpath, passed_home_path, 0, | ||||
|     		disp_username); | ||||
| 
 | ||||
|   if (print_current && !print_domain) | ||||
|     current_user(print_sids, print_cygpath, passed_home_path, | ||||
| 		 id_offset, disp_username); | ||||
| 
 | ||||
|   if (servername) | ||||
|     netapibufferfree (servername); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue