git.samba.org
/
obnox
/
samba-ctdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
22eb452
)
v3-6-ctdb: 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>
Thu, 13 Oct 2011 15:24:38 +0000
(17:24 +0200)
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 7b1675204342e55d665bf619985ff79f6b86b8c1..e9671649cfc53a3d13db4503f3dd474db0c230ab 100644
(file)
--- a/
nsswitch/winbind_nss_linux.c
+++ b/
nsswitch/winbind_nss_linux.c
@@
-1059,6
+1059,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