diff options
author | Jeremy Allison <jra@samba.org> | 2001-07-06 21:53:32 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-07-06 21:53:32 +0000 |
commit | e78a114425129d980f79db812dbea368123913ed (patch) | |
tree | 06589d84ccdabdd2f13c0d45af03c651dcb100a3 | |
parent | ed5a1f70c6d155788b62e9e6e8c5d97a5ca0858d (diff) | |
download | samba-e78a114425129d980f79db812dbea368123913ed.tar.gz samba-e78a114425129d980f79db812dbea368123913ed.tar.xz samba-e78a114425129d980f79db812dbea368123913ed.zip |
Don't try and open tdb secrets file in non-root/local mode.
Jeremy.
-rw-r--r-- | source/utils/smbpasswd.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/utils/smbpasswd.c b/source/utils/smbpasswd.c index a10e7579109..cfc8ac6aa1d 100644 --- a/source/utils/smbpasswd.c +++ b/source/utils/smbpasswd.c @@ -925,8 +925,6 @@ int main(int argc, char **argv) } strupper(global_myname); - secrets_init(); - /* Check the effective uid - make sure we are not setuid */ if ((geteuid() == (uid_t)0) && (getuid() != (uid_t)0)) { fprintf(stderr, "smbpasswd must *NOT* be setuid root.\n"); @@ -941,6 +939,7 @@ int main(int argc, char **argv) } if (local_mode || getuid() == 0) { + secrets_init(); return process_root(argc, argv); } |