summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-02-25 23:12:29 +0000
committerAndrew Bartlett <abartlet@samba.org>2004-02-25 23:12:29 +0000
commit9e2a098a0abed616d2db4fba2847083b7e118f3f (patch)
tree0d7ce193f5bdf9ca73c39fe5c4d8bcf9d7b3b50f /source3/utils
parent56bd63b1cde5e1bde8f88b0c6a06f1131f1dac13 (diff)
downloadsamba-9e2a098a0abed616d2db4fba2847083b7e118f3f.tar.gz
samba-9e2a098a0abed616d2db4fba2847083b7e118f3f.tar.bz2
samba-9e2a098a0abed616d2db4fba2847083b7e118f3f.zip
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 191b43159e7358541be9a3deac8c447885145442)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net.c6
1 files changed, 6 insertions, 0 deletions
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;