summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-12-12 17:26:49 -0800
committerJeremy Allison <jra@samba.org>2007-12-12 17:26:49 -0800
commit9373e1ea90c088b4a1156554efb9e1da1738a8d3 (patch)
treece685c61705e1140f8f871ca020c50c125507f48 /source3/utils
parent022014dba281a50d98ac2f00a4c941124065914f (diff)
downloadsamba-9373e1ea90c088b4a1156554efb9e1da1738a8d3.tar.gz
samba-9373e1ea90c088b4a1156554efb9e1da1738a8d3.tar.bz2
samba-9373e1ea90c088b4a1156554efb9e1da1738a8d3.zip
Fix bug #3727 with patch from Steve Langasek <vorlon@debian.org>
Jeremy. (This used to be commit 0723760ba47a465d2ff5a22a680f1b5196eca7d8)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/smbpasswd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c
index ea3bb38dc4..deed08fea3 100644
--- a/source3/utils/smbpasswd.c
+++ b/source3/utils/smbpasswd.c
@@ -94,6 +94,10 @@ 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 (getuid() != 0) {
+ fprintf(stderr, "smbpasswd -L can only be used by root.\n");
+ exit(1);
+ }
local_flags |= LOCAL_AM_ROOT;
break;
case 'c':