summaryrefslogtreecommitdiffstats
path: root/source/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
commita7728bfa52291ec3149fbb704d7b30689af83e7c (patch)
tree86bbcdba9d17db92d1c32579f8011d23832be531 /source/nsswitch/winbindd.c
parent139e767e78adafa4d4469d2d63415d46267f2fc9 (diff)
downloadsamba-a7728bfa52291ec3149fbb704d7b30689af83e7c.tar.gz
samba-a7728bfa52291ec3149fbb704d7b30689af83e7c.tar.xz
samba-a7728bfa52291ec3149fbb704d7b30689af83e7c.zip
Misc fixes to get winbindd working. We can now do a 'getent passwd'
and 'getent group' and have most things working.
Diffstat (limited to 'source/nsswitch/winbindd.c')
-rw-r--r--source/nsswitch/winbindd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c
index 9d315a0811d..9dd995b4aee 100644
--- a/source/nsswitch/winbindd.c
+++ b/source/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);