* mkgroup.c (enum_local_groups): Don't skip printing groups when
print_current is set and group SID is not curr_pgrp. (enum_groups): Ditto. (main): Fix condition when SYSTEM group gets printed. * mkpasswd.c (enum_users): Don't skip printing users when print_current is set and user SID is not curr_user. (main): Allow printing standard accounts even when print_current is set.
This commit is contained in:
parent
576677295f
commit
328b090f29
|
@ -1,3 +1,13 @@
|
|||
2008-08-25 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* mkgroup.c (enum_local_groups): Don't skip printing groups when
|
||||
print_current is set and group SID is not curr_pgrp.
|
||||
(enum_groups): Ditto.
|
||||
(main): Fix condition when SYSTEM group gets printed.
|
||||
* mkpasswd.c (enum_users): Don't skip printing users when print_current
|
||||
is set and user SID is not curr_user.
|
||||
(main): Allow printing standard accounts even when print_current is set.
|
||||
|
||||
2008-08-18 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* mkgroup.c (enum_local_groups): Use NetLocalGroupGetInfo to find out
|
||||
|
|
|
@ -435,8 +435,7 @@ enum_local_groups (BOOL domain, domlist_t *dom_or_machine, const char *sep,
|
|||
/* fall through */;
|
||||
else if (EqualSid (curr_pgrp.psid, psid))
|
||||
got_curr_pgrp = TRUE;
|
||||
else
|
||||
continue;
|
||||
|
||||
gid = *GetSidSubAuthority (psid, *GetSidSubAuthorityCount(psid) - 1);
|
||||
printf ("%ls%s%ls:%s:%ld:\n",
|
||||
with_dom && !is_builtin ? domain_name : L"",
|
||||
|
@ -565,8 +564,7 @@ enum_groups (BOOL domain, domlist_t *dom_or_machine, const char *sep,
|
|||
/* fall through */;
|
||||
else if (EqualSid (curr_pgrp.psid, psid))
|
||||
got_curr_pgrp = TRUE;
|
||||
else
|
||||
continue;
|
||||
|
||||
printf ("%ls%s%ls:%s:%lu:\n",
|
||||
with_dom ? domain_name : L"",
|
||||
with_dom ? sep : "",
|
||||
|
@ -880,7 +878,7 @@ skip:
|
|||
}
|
||||
|
||||
/* Get 'system' group */
|
||||
if (!disp_groupname && print_system && print_builtin && !print_current)
|
||||
if (!disp_groupname && print_system && print_builtin && print_domlist)
|
||||
print_special (&sid_nt_auth, 1, SECURITY_LOCAL_SYSTEM_RID,
|
||||
0, 0, 0, 0, 0, 0, 0);
|
||||
|
||||
|
|
|
@ -511,8 +511,6 @@ enum_users (BOOL domain, domlist_t *dom_or_machine, const char *sep,
|
|||
/* fall through */;
|
||||
else if (EqualSid (curr_user.psid, psid))
|
||||
got_curr_user = TRUE;
|
||||
else
|
||||
continue;
|
||||
|
||||
printf ("%ls%s%ls:unused:%lu:%lu:%ls%sU-%ls\\%ls,%s:%s:/bin/bash\n",
|
||||
with_dom ? domain_name : L"",
|
||||
|
@ -873,7 +871,7 @@ skip:
|
|||
? domlist[i].id_offset : off : 0;
|
||||
if (!domlist[i].domain && domlist[i].str && print_unix)
|
||||
enum_unix_users (domlist + i, sep_char, my_off, print_unix);
|
||||
if (!my_off && !print_current && !disp_username)
|
||||
if (!my_off && !disp_username)
|
||||
enum_std_accounts ();
|
||||
enum_users (domlist[i].domain, domlist + i, sep_char, print_cygpath,
|
||||
passed_home_path, my_off, disp_username, print_current);
|
||||
|
|
Loading…
Reference in New Issue