From 3475c25714ee6267bf056f7b23c421c6d8eb5d76 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Tue, 8 May 2001 03:52:07 +0000 Subject: 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) --- source3/nsswitch/winbindd.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source3/nsswitch/winbindd.c') 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); -- cgit