diff options
author | Volker Lendecke <vlendec@samba.org> | 2003-06-18 08:42:04 +0000 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2003-06-18 08:42:04 +0000 |
commit | e48ebd09ffc57633fcb96c3a9406c9e7f65c5b3c (patch) | |
tree | 6165d25b69603c48fc5ad403f05282761d25cab5 /source3 | |
parent | 1eb644772768dff6252f89aadf2560f556449809 (diff) | |
download | samba-e48ebd09ffc57633fcb96c3a9406c9e7f65c5b3c.tar.gz samba-e48ebd09ffc57633fcb96c3a9406c9e7f65c5b3c.tar.bz2 samba-e48ebd09ffc57633fcb96c3a9406c9e7f65c5b3c.zip |
Better panic cleanly than segfault later when no sid can be found and created.
Everybody who calls get_global_sam_sid expects this to return non-NULL, and
there are way too many places where this is called.
Volker
(This used to be commit 2dfa896e6fdd52aa0eebe7d811c7b4072fe98be3)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/passdb/machine_sid.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/passdb/machine_sid.c b/source3/passdb/machine_sid.c index a578ecc711..4e7476781c 100644 --- a/source3/passdb/machine_sid.c +++ b/source3/passdb/machine_sid.c @@ -191,8 +191,9 @@ DOM_SID *get_global_sam_sid(void) /* memory for global_sam_sid is allocated in pdb_generate_sam_sid() as needed */ - if (!pdb_generate_sam_sid()) - global_sam_sid=NULL; + if (!pdb_generate_sam_sid()) { + smb_panic("Could not generate a machine SID\n"); + } return global_sam_sid; } |