From 11cd2378b08a69fcca6f16827fd6a27f98ccc479 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 28 Feb 2008 11:11:12 +0000 Subject: [PATCH] * mkpasswd.c (main): Simplify generating SYSTEM entry. Add entries for LocalService and NetworkService accounts. Change comments. --- winsup/utils/ChangeLog | 5 +++++ winsup/utils/mkpasswd.c | 20 +++++--------------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index 1f86a44ca..e4b1d032e 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,8 @@ +2008-02-28 Corinna Vinschen + + * mkpasswd.c (main): Simplify generating SYSTEM entry. Add entries + for LocalService and NetworkService accounts. Change comments. + 2008-01-13 Corinna Vinschen * cygcheck.cc (dump_sysinfo): Always try to get a OSVERSIONINFOEX diff --git a/winsup/utils/mkpasswd.c b/winsup/utils/mkpasswd.c index e4d9a9684..63cfa27b8 100644 --- a/winsup/utils/mkpasswd.c +++ b/winsup/utils/mkpasswd.c @@ -702,21 +702,11 @@ main (int argc, char **argv) { if (print_local) { -#if 0 - /* - * Get 'Everyone' group - */ - print_special (print_sids, &sid_world_auth, 1, SECURITY_WORLD_RID, - 0, 0, 0, 0, 0, 0, 0); -#endif - /* - * Get 'system' group - */ - print_special (print_sids, &sid_nt_auth, 1, SECURITY_LOCAL_SYSTEM_RID, - 0, 0, 0, 0, 0, 0, 0); - /* - * Get 'administrators' group - */ + /* Generate service starter account entries. */ + printf ("SYSTEM:*:18:544:,S-1-5-18::\n"); + printf ("LocalService:*:19:544:U-NT AUTHORITY\\LocalService,S-1-5-19::\n"); + printf ("NetworkService:*:20:544:U-NT AUTHORITY\\NetworkService,S-1-5-20::\n"); + /* Get 'administrators' group (has localized name). */ if (!print_local_groups) print_special (print_sids, &sid_nt_auth, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0);