diff options
author | Andrew Bartlett <abartlet@samba.org> | 2004-02-25 23:19:17 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2004-02-25 23:19:17 +0000 |
commit | 41025e8d4f88eb024dbe4a130cf9eb0519b39158 (patch) | |
tree | a241baaca8b9e64111b26f34a38d31ab1e87b710 /source3 | |
parent | eb8ed992c65a4d394d40ef21002c366ce501c7e4 (diff) | |
download | samba-41025e8d4f88eb024dbe4a130cf9eb0519b39158.tar.gz samba-41025e8d4f88eb024dbe4a130cf9eb0519b39158.tar.bz2 samba-41025e8d4f88eb024dbe4a130cf9eb0519b39158.zip |
(merge from 3.0)
Fix bug in previous global_sam_sid() commit. I broke the 'read from
MACHINE.SID' file functionality.
Also, before we print out the results of 'net getlocalsid' and 'net
getdomainsid', ensure we have tried to read that file, or have
generated one.
Andrew Bartlett
(This used to be commit af1b6447b8292a83851361570219ee6d889e0898)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/passdb/machine_sid.c | 1 | ||||
-rw-r--r-- | source3/utils/net.c | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/source3/passdb/machine_sid.c b/source3/passdb/machine_sid.c index 235187abf0..903f0ca5a1 100644 --- a/source3/passdb/machine_sid.c +++ b/source3/passdb/machine_sid.c @@ -163,7 +163,6 @@ static DOM_SID *pdb_generate_sam_sid(void) /* Stored the old sid from MACHINE.SID successfully.*/ SAFE_FREE(fname); - SAFE_FREE(sam_sid); return sam_sid; } diff --git a/source3/utils/net.c b/source3/utils/net.c index 9026900e81..01f56b8a0c 100644 --- a/source3/utils/net.c +++ b/source3/utils/net.c @@ -423,6 +423,9 @@ static int net_getlocalsid(int argc, const char **argv) "backend knowlege (such as the sid stored in LDAP)\n")); } + /* Generate one, if it doesn't exist */ + get_global_sam_sid(); + if (!secrets_fetch_domain_sid(name, &sid)) { DEBUG(0, ("Can't fetch domain SID for name: %s\n", name)); return 1; @@ -462,6 +465,9 @@ static int net_getdomainsid(int argc, const char **argv) "backend knowlege (such as the sid stored in LDAP)\n")); } + /* Generate one, if it doesn't exist */ + get_global_sam_sid(); + if (!secrets_fetch_domain_sid(global_myname(), &domain_sid)) { d_printf("Could not fetch local SID\n"); return 1; |