git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af470dc
)
apply patch from v3-0-ctdb to special case root in libnss_winbind
author
Andrew Tridgell
<tridge@samba.org>
Mon, 21 Apr 2008 16:41:32 +0000
(18:41 +0200)
committer
Michael Adam
<obnox@samba.org>
Wed, 10 Mar 2010 12:14:35 +0000
(13:14 +0100)
This is needed to ensure the administrator can login to a node even
when ctdbd and winbindd are stuck
nsswitch/winbind_nss_linux.c
patch
|
blob
|
history
diff --git
a/nsswitch/winbind_nss_linux.c
b/nsswitch/winbind_nss_linux.c
index 4a7943278ea9f1b71730d0e8b75827956ddc3812..41214768ffdd144730529fe34a84538ad20e62b1 100644
(file)
--- a/
nsswitch/winbind_nss_linux.c
+++ b/
nsswitch/winbind_nss_linux.c
@@
-1034,6
+1034,14
@@
_nss_winbind_initgroups_dyn(char *user, gid_t group, long int *start,
user, group);
#endif
+ if (strcmp(user, "root") == 0) {
+ /* as a special case, don't return groups for
+ 'root'. This ensures that no matter what state
+ winbind is in, we can still ssh into the host as
+ root. */
+ return NSS_STATUS_NOTFOUND;
+ }
+
#if HAVE_PTHREAD
pthread_mutex_lock(&winbind_nss_mutex);
#endif