summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-05-08 03:52:07 +0000
committerTim Potter <tpot@samba.org>2001-05-08 03:52:07 +0000
commit3475c25714ee6267bf056f7b23c421c6d8eb5d76 (patch)
treed2ae5542fa175fe370f566b86216548922963f64 /source3/nsswitch/winbindd.c
parent706a1188c52a4387a0cd875b0c9ae74dd86f103c (diff)
downloadsamba-3475c25714ee6267bf056f7b23c421c6d8eb5d76.tar.gz
samba-3475c25714ee6267bf056f7b23c421c6d8eb5d76.tar.bz2
samba-3475c25714ee6267bf056f7b23c421c6d8eb5d76.zip
Misc fixes to get winbindd working. We can now do a 'getent passwd'
and 'getent group' and have most things working. (This used to be commit a7728bfa52291ec3149fbb704d7b30689af83e7c)
Diffstat (limited to 'source3/nsswitch/winbindd.c')
-rw-r--r--source3/nsswitch/winbindd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c
index 9d315a0811..9dd995b4ae 100644
--- a/source3/nsswitch/winbindd.c
+++ b/source3/nsswitch/winbindd.c
@@ -644,6 +644,13 @@ int main(int argc, char **argv)
BOOL interactive = False;
int opt, new_debuglevel = -1;
+ /* Must be root */
+
+ if(geteuid() != (uid_t)0) {
+ fprintf(stderr, "Must have effective user id of zero.\n");
+ exit(1);
+ }
+
/* Set environment variable so we don't recursively call ourselves.
This may also be useful interactively. */
SETENV(WINBINDD_DONT_ENV, "1", 1);