1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

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

Jeremy.
This commit is contained in:
Jeremy Allison 0001-01-01 00:00:00 +00:00
parent ed5a1f70c6
commit e78a114425

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