1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-27 14:04:05 +03:00

Don't try and open tdb secrets file in non-root/local mode.

Jeremy.
(This used to be commit e78a114425129d980f79db812dbea368123913ed)
This commit is contained in:
Jeremy Allison 2001-07-06 21:53:32 +00:00
parent 9df203f876
commit da9fb5ba38

View File

@ -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);
}