diff options
author | Luke Leighton <lkcl@samba.org> | 1997-10-22 14:28:19 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1997-10-22 14:28:19 +0000 |
commit | 5897f0493d0665ae53ea181e122c467faa0c7642 (patch) | |
tree | 1c5b0bd6fd4da0d4a244a5f4f1cfa517abb19863 /source3/pipenetlog.c | |
parent | 2e8cedba6480d0c1f89d3490888cadac769d09ca (diff) | |
download | samba-5897f0493d0665ae53ea181e122c467faa0c7642.tar.gz samba-5897f0493d0665ae53ea181e122c467faa0c7642.tar.bz2 samba-5897f0493d0665ae53ea181e122c467faa0c7642.zip |
Makefile client.c clientutil.c clitar.c nmbsync.c :
redid the split that i did a year ago, taking the functions in client.c
out into clientutil.c. guess what? we could now do encrypted password
NetServerEnum2 calls in nmbd, if we wanted to.
i can now use cli_call_api() to send to different pipes. i hope.
pipenetlog.c:
allow adding to users group _and_ to admin group. if adding to
guest group, don't allow adding to users or admin as well.
smb.h :
added some pipe #defines (\PIPE\NETLOGON \PIPE\srvsvc ...)
proto.h :
usual.
(This used to be commit 6ee065ce6e099acfc7e83ad399ef6e60b4c625c1)
Diffstat (limited to 'source3/pipenetlog.c')
-rw-r--r-- | source3/pipenetlog.c | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/source3/pipenetlog.c b/source3/pipenetlog.c index c5502bb94a..7e69ac3880 100644 --- a/source3/pipenetlog.c +++ b/source3/pipenetlog.c @@ -516,6 +516,7 @@ static void api_lsa_sam_logon( user_struct *vuser, pstring domain_groups; pstring dom_sid; pstring other_sids; + fstring tmp; extern pstring myname; uint32 r_uid; uint32 r_gid; @@ -545,22 +546,28 @@ static void api_lsa_sam_logon( user_struct *vuser, /* any additional groups this user is in. e.g power users */ pstrcpy(domain_groups, lp_domain_groups()); - /* one RID group always added: 512 (Admin); 513 (Users); 514 (Guests) */ - + /* can only be a user or a guest. cannot be guest _and_ admin */ if (user_in_list(samlogon_user, lp_domain_guest_users())) { - DEBUG(3,("domain guest access granted\n")); - strcat(domain_groups, " 514/7 "); - } - else if (user_in_list(samlogon_user, lp_domain_admin_users())) - { - DEBUG(3,("domain admin access granted\n")); - strcat(domain_groups, " 512/7 "); + sprintf(tmp, " %ld/7 ", DOMAIN_GROUP_RID_GUESTS); + strcat(domain_groups, tmp); + + DEBUG(3,("domain guest access %s granted\n", tmp)); } else { - DEBUG(3,("domain user access granted\n")); - strcat(domain_groups, " 513/7 "); + sprintf(tmp, " %ld/7 ", DOMAIN_GROUP_RID_USERS); + strcat(domain_groups, tmp); + + DEBUG(3,("domain user access %s granted\n", tmp)); + + if (user_in_list(samlogon_user, lp_domain_admin_users())) + { + sprintf(tmp, " %ld/7 ", DOMAIN_GROUP_RID_ADMINS); + strcat(domain_groups, tmp); + + DEBUG(3,("domain admin access %s granted\n", tmp)); + } } num_gids = make_dom_gids(domain_groups, gids); |