diff options
| author | Andreas Schneider <asn@samba.org> | 2014-12-16 15:52:43 +0100 |
|---|---|---|
| committer | Andreas Schneider <asn@cryptomilk.org> | 2014-12-16 18:54:41 +0100 |
| commit | 10fdf4f5eb1f1c0a0f12050fe8241c3e92f715d9 (patch) | |
| tree | 5e7c0ca54c1bb0c869e15ce62df9de8fa9debb46 /source3/utils | |
| parent | af570c294b03035f022bcb53b81b2ef9025de516 (diff) | |
| download | samba-10fdf4f5eb1f1c0a0f12050fe8241c3e92f715d9.tar.gz samba-10fdf4f5eb1f1c0a0f12050fe8241c3e92f715d9.tar.xz samba-10fdf4f5eb1f1c0a0f12050fe8241c3e92f715d9.zip | |
smbstatus: Tell the user that smbstatus can only be run as root.
In the meantime smbstatus tries to collection information from tdb's
which are only accessible by root as they contain sensitive information
like session keys and other secrets. This means smbstatus can no longer
be executed as a user.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11012
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Dec 16 18:54:41 CET 2014 on sn-devel-104
Diffstat (limited to 'source3/utils')
| -rw-r--r-- | source3/utils/status.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/utils/status.c b/source3/utils/status.c index cd6a988b2f..61efa934a4 100644 --- a/source3/utils/status.c +++ b/source3/utils/status.c @@ -386,6 +386,13 @@ int main(int argc, const char *argv[]) goto done; } + if (getuid() != 0) { + d_printf("smbstatus only works as root!\n"); + ret = 1; + goto done; + } + + pc = poptGetContext(NULL, argc, argv, long_options, POPT_CONTEXT_KEEP_FIRST); |
