diff options
-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; |