diff options
Diffstat (limited to 'source/utils/smbpasswd.c')
-rw-r--r-- | source/utils/smbpasswd.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/utils/smbpasswd.c b/source/utils/smbpasswd.c index 7460662441..ef4e20bb7f 100644 --- a/source/utils/smbpasswd.c +++ b/source/utils/smbpasswd.c @@ -96,6 +96,12 @@ static int process_options(int argc, char **argv, int local_flags) while ((ch = getopt(argc, argv, "c:axdehminjr:sw:R:D:U:LW")) != EOF) { switch(ch) { case 'L': +#if !defined(DEVELOPER) + if (getuid() != 0) { + fprintf(stderr, "smbpasswd -L can only be used by root.\n"); + exit(1); + } +#endif local_flags |= LOCAL_AM_ROOT; break; case 'c': |