|
|
0023908 |
commit 068ea89e7d335d381276a2fff73d5abbb2b0a04d
|
|
|
0023908 |
Author: Neil Brown <neilb@suse.de>
|
|
|
0023908 |
Date: Wed Nov 26 08:48:03 2008 -0500
|
|
|
0023908 |
|
|
|
0023908 |
gssd: unblock DNOTIFY_SIGNAL in case it was blocked.
|
|
|
0023908 |
|
|
|
0023908 |
I have a situation where rpc.gssd appears to not be working.
|
|
|
0023908 |
Mount attempts which need to communicate with it block.
|
|
|
0023908 |
|
|
|
0023908 |
I've narrowed down the problem to that fact that all realtime signals
|
|
|
0023908 |
have been blocked. This means that DNOTIFY_SIGNAL (which is a
|
|
|
0023908 |
realtime signal) is never delivered, so gssd never rescans the
|
|
|
0023908 |
rpc_pipe/nfs directory.
|
|
|
0023908 |
|
|
|
0023908 |
It seems start_kde (or whatever it is called) and all descendants have
|
|
|
0023908 |
these
|
|
|
0023908 |
signals blocked. xfce seems to do the same thing. gnome doesn't.
|
|
|
0023908 |
|
|
|
0023908 |
So if you start rpc.gssd from a terminal window while logged in via
|
|
|
0023908 |
KDE, it doesn't behave as expected.
|
|
|
0023908 |
|
|
|
0023908 |
Signed-off-by: Neil Brown <neilb@suse.de>
|
|
|
0023908 |
Signed-off-by: Steve Dickson <steved@redhat.com>
|
|
|
0023908 |
|
|
|
0023908 |
diff --git a/utils/gssd/gssd_main_loop.c b/utils/gssd/gssd_main_loop.c
|
|
|
0023908 |
index 84f04e9..b9f3a06 100644
|
|
|
0023908 |
--- a/utils/gssd/gssd_main_loop.c
|
|
|
0023908 |
+++ b/utils/gssd/gssd_main_loop.c
|
|
|
0023908 |
@@ -99,6 +99,7 @@ gssd_run()
|
|
|
0023908 |
int ret;
|
|
|
0023908 |
struct sigaction dn_act;
|
|
|
0023908 |
int fd;
|
|
|
0023908 |
+ sigset_t set;
|
|
|
0023908 |
|
|
|
0023908 |
/* Taken from linux/Documentation/dnotify.txt: */
|
|
|
0023908 |
dn_act.sa_sigaction = dir_notify_handler;
|
|
|
0023908 |
@@ -106,6 +107,11 @@ gssd_run()
|
|
|
0023908 |
dn_act.sa_flags = SA_SIGINFO;
|
|
|
0023908 |
sigaction(DNOTIFY_SIGNAL, &dn_act, NULL);
|
|
|
0023908 |
|
|
|
0023908 |
+ /* just in case the signal is blocked... */
|
|
|
0023908 |
+ sigemptyset(&set);
|
|
|
0023908 |
+ sigaddset(&set, DNOTIFY_SIGNAL);
|
|
|
0023908 |
+ sigprocmask(SIG_UNBLOCK, &set, NULL);
|
|
|
0023908 |
+
|
|
|
0023908 |
if ((fd = open(pipefs_nfsdir, O_RDONLY)) == -1) {
|
|
|
0023908 |
printerr(0, "ERROR: failed to open %s: %s\n",
|
|
|
0023908 |
pipefs_nfsdir, strerror(errno));
|