diff options
author | Jeremy Allison <jra@samba.org> | 1998-05-14 01:30:40 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-05-14 01:30:40 +0000 |
commit | a4276507e43487f47445eab11d4ac1b080b3270e (patch) | |
tree | 24c44403b3a64828533904d689a16f239ba6e955 /source3/lib/util_hnd.c | |
parent | 329fe213439a4ef253e0b16221f98d2ade032e06 (diff) | |
download | samba-a4276507e43487f47445eab11d4ac1b080b3270e.tar.gz samba-a4276507e43487f47445eab11d4ac1b080b3270e.tar.bz2 samba-a4276507e43487f47445eab11d4ac1b080b3270e.zip |
chgpasswd.c: Added comments to #ifdefs
ipc.c: Caused samba password changing not to be done if UNIX password
changing requested and not successful.
util.c: Added string_to_sid() and sid_to_string() functions.
lib/rpc/client/cli_samr.c:
lib/rpc/include/rpc_misc.h:
lib/rpc/parse/parse_lsa.c:
lib/rpc/parse/parse_misc.c:
lib/rpc/parse/parse_net.c:
lib/rpc/parse/parse_samr.c:
lib/rpc/server/srv_lsa.c:
lib/rpc/server/srv_lsa_hnd.c:
lib/rpc/server/srv_netlog.c:
lib/rpc/server/srv_samr.c:
lib/rpc/server/srv_util.c: Changes so that instead of passing SIDs
around as char *, they are converted to DOM_SID at the earliest
opportunity, and passed around as that. Also added dynamic memory
allocation of group sids. Preparing to auto-generate machine sid.
Jeremy.
(This used to be commit 134d6fa79c1b6b9505a2c84ba9bfb91dd3be76e5)
Diffstat (limited to 'source3/lib/util_hnd.c')
-rw-r--r-- | source3/lib/util_hnd.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/source3/lib/util_hnd.c b/source3/lib/util_hnd.c index 1d1341d16e..91844ee8a2 100644 --- a/source3/lib/util_hnd.c +++ b/source3/lib/util_hnd.c @@ -206,22 +206,23 @@ BOOL set_lsa_policy_samr_pol_status(POLICY_HND *hnd, uint32 pol_status) ****************************************************************************/ BOOL set_lsa_policy_samr_sid(POLICY_HND *hnd, DOM_SID *sid) { - int pnum = find_lsa_policy_by_hnd(hnd); + pstring sidstr; + int pnum = find_lsa_policy_by_hnd(hnd); - if (OPEN_POL(pnum)) - { - DEBUG(3,("%s Setting policy sid=%s pnum=%x\n", - timestring(), dom_sid_to_string(sid), pnum)); + if (OPEN_POL(pnum)) + { + DEBUG(3,("%s Setting policy sid=%s pnum=%x\n", + timestring(), sid_to_string(sidstr, sid), pnum)); - memcpy(&(Policy[pnum].dev.samr.sid), sid, sizeof(*sid)); - return True; - } - else - { - DEBUG(3,("%s Error setting policy sid=%s (pnum=%x)\n", - timestring(), dom_sid_to_string(sid), pnum)); - return False; - } + memcpy(&(Policy[pnum].dev.samr.sid), sid, sizeof(*sid)); + return True; + } + else + { + DEBUG(3,("%s Error setting policy sid=%s (pnum=%x)\n", + timestring(), sid_to_string(sidstr, sid), pnum)); + return False; + } } /**************************************************************************** |