Backport usage warning for smbstatus(1), picked from upstream.
Problem noticed and different patch proposed by giovanni@. ok giovanni@ Ian McWilliam
This commit is contained in:
parent
dfec945430
commit
cba377ac48
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.209 2015/09/11 11:35:09 jca Exp $
|
||||
# $OpenBSD: Makefile,v 1.210 2015/09/30 18:16:14 jca Exp $
|
||||
|
||||
SHARED_ONLY = Yes
|
||||
VERSION = 4.1.20
|
||||
@ -19,6 +19,7 @@ PKGNAME-tevent = tevent-${TEVENT_V}
|
||||
PKGNAME-util = samba-util-${VERSION}
|
||||
PKGNAME-docs = samba-docs-${VERSION}
|
||||
|
||||
REVISION-main = 0
|
||||
REVISION-ldb = 5
|
||||
REVISION-tevent = 3
|
||||
|
||||
|
19
net/samba/patches/patch-source3_utils_status_c
Normal file
19
net/samba/patches/patch-source3_utils_status_c
Normal file
@ -0,0 +1,19 @@
|
||||
$OpenBSD: patch-source3_utils_status_c,v 1.1 2015/09/30 18:16:15 jca Exp $
|
||||
|
||||
Backport upstream warning for https://bugzilla.samba.org/show_bug.cgi?id=11012
|
||||
|
||||
--- source3/utils/status.c.orig Wed Sep 30 12:53:32 2015
|
||||
+++ source3/utils/status.c Wed Sep 30 12:53:35 2015
|
||||
@@ -376,6 +376,12 @@ static void print_notify_recs(const char *path,
|
||||
goto done;
|
||||
}
|
||||
|
||||
+ if (getuid() != 0) {
|
||||
+ d_printf("smbstatus only works as root!\n");
|
||||
+ ret = 1;
|
||||
+ goto done;
|
||||
+ }
|
||||
+
|
||||
pc = poptGetContext(NULL, argc, (const char **) argv, long_options,
|
||||
POPT_CONTEXT_KEEP_FIRST);
|
||||
|
Loading…
x
Reference in New Issue
Block a user