summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-01-10 06:20:03 +0000
committerTim Potter <tpot@samba.org>2002-01-10 06:20:03 +0000
commit610f530aee4da9b63cb1cb9005650d27e4846bc0 (patch)
treed31aebd3c8ce9d5dafc22fb31d9615707056898c /source3/nsswitch/winbindd.c
parentcd1ad031a66118149bffb4e4ded9720ce9605742 (diff)
downloadsamba-610f530aee4da9b63cb1cb9005650d27e4846bc0.tar.gz
samba-610f530aee4da9b63cb1cb9005650d27e4846bc0.tar.bz2
samba-610f530aee4da9b63cb1cb9005650d27e4846bc0.zip
A big tidyup while thinking about getting trusted domains being re-read
when they are added or removed on the PDC. - renamed GETPWNAM_FROM_{UID,USER} constants and functions to GETPW{NAM,UID} - renamed GETGRNAM_FROM_{GID,GROUP} constants and functions to GETGR{NAM,GID} - use SIGUSR2 in winbindd for debugging/logging instead of SIGUSR1 in preparation for moving to smbcontrol type messages (not sure whether to ditch this altogether or not) - tidy debugging messages in top level winbind user and group routines - convert talloc_init() to talloc_init_named() - make enumerations of the domain list use the same local variable names (This used to be commit eeb8af9c1a66bfcd80823d7b406acbab79857a16)
Diffstat (limited to 'source3/nsswitch/winbindd.c')
-rw-r--r--source3/nsswitch/winbindd.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c
index a877bf9e0a..7da20d8b01 100644
--- a/source3/nsswitch/winbindd.c
+++ b/source3/nsswitch/winbindd.c
@@ -169,11 +169,11 @@ static void termination_handler(int signum)
do_sigterm = True;
}
-static BOOL do_sigusr1;
+static BOOL do_sigusr2;
-static void sigusr1_handler(int signum)
+static void sigusr2_handler(int signum)
{
- do_sigusr1 = True;
+ do_sigusr2 = True;
}
static BOOL do_sighup;
@@ -285,8 +285,8 @@ static struct dispatch_table dispatch_table[] = {
/* User functions */
- { WINBINDD_GETPWNAM_FROM_USER, winbindd_getpwnam_from_user, "GETPWNAM_FROM_USER" },
- { WINBINDD_GETPWNAM_FROM_UID, winbindd_getpwnam_from_uid, "GETPWNAM_FROM_UID" },
+ { WINBINDD_GETPWNAM, winbindd_getpwnam, "GETPWNAM" },
+ { WINBINDD_GETPWUID, winbindd_getpwuid, "GETPWUID" },
{ WINBINDD_SETPWENT, winbindd_setpwent, "SETPWENT" },
{ WINBINDD_ENDPWENT, winbindd_endpwent, "ENDPWENT" },
@@ -296,8 +296,8 @@ static struct dispatch_table dispatch_table[] = {
/* Group functions */
- { WINBINDD_GETGRNAM_FROM_GROUP, winbindd_getgrnam_from_group, "GETGRNAM_FROM_GROUP" },
- { WINBINDD_GETGRNAM_FROM_GID, winbindd_getgrnam_from_gid, "GETGRNAM_FROM_GID" },
+ { WINBINDD_GETGRNAM, winbindd_getgrnam, "GETGRNAM" },
+ { WINBINDD_GETGRGID, winbindd_getgrgid, "GETGRGID" },
{ WINBINDD_SETGRENT, winbindd_setgrent, "SETGRENT" },
{ WINBINDD_ENDGRENT, winbindd_endgrent, "ENDGRENT" },
{ WINBINDD_GETGRENT, winbindd_getgrent, "GETGRENT" },
@@ -715,9 +715,9 @@ static void process_loop(int accept_sock)
do_sighup = False;
}
- if (do_sigusr1) {
+ if (do_sigusr2) {
print_winbindd_status();
- do_sigusr1 = False;
+ do_sigusr2 = False;
}
}
}
@@ -737,9 +737,9 @@ int main(int argc, char **argv)
int opt, new_debuglevel = -1;
/* glibc (?) likes to print "User defined signal 1" and exit if a
- SIGUSR1 is received before a handler is installed */
+ SIGUSR2 is received before a handler is installed */
- CatchSignal(SIGUSR1, SIG_IGN);
+ CatchSignal(SIGUSR2, SIG_IGN);
fault_setup((void (*)(void *))fault_quit );
@@ -857,7 +857,7 @@ int main(int argc, char **argv)
BlockSignals(False, SIGINT);
BlockSignals(False, SIGQUIT);
BlockSignals(False, SIGTERM);
- BlockSignals(False, SIGUSR1);
+ BlockSignals(False, SIGUSR2);
BlockSignals(False, SIGHUP);
/* Setup signal handlers */
@@ -867,8 +867,9 @@ int main(int argc, char **argv)
CatchSignal(SIGTERM, termination_handler);
CatchSignal(SIGPIPE, SIG_IGN); /* Ignore sigpipe */
+ CatchSignal(SIGUSR1, SIG_IGN); /* Samba messages */
- CatchSignal(SIGUSR1, sigusr1_handler); /* Debugging sigs */
+ CatchSignal(SIGUSR2, sigusr2_handler); /* Debugging sigs */
CatchSignal(SIGHUP, sighup_handler);
/* Create UNIX domain socket */