~mdw
/
become
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Extensive modifications to handle netgroups. Also sanitise user and group
[become]
/
src
/
daemon.c
diff --git
a/src/daemon.c
b/src/daemon.c
index
3f1fa93
..
d2bf8df
100644
(file)
--- a/
src/daemon.c
+++ b/
src/daemon.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: daemon.c,v 1.
2 1997/08/04 10:24:21
mdw Exp $
+ * $Id: daemon.c,v 1.
3 1997/08/07 09:49:39
mdw Exp $
*
* Running a `become' daemon
*
*
* Running a `become' daemon
*
@@
-29,6
+29,10
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: daemon.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: daemon.c,v $
+ * Revision 1.3 1997/08/07 09:49:39 mdw
+ * Extensive modifications to handle netgroups. Also sanitise user and group
+ * names before adding them to the symbol table.
+ *
* Revision 1.2 1997/08/04 10:24:21 mdw
* Sources placed under CVS control.
*
* Revision 1.2 1997/08/04 10:24:21 mdw
* Sources placed under CVS control.
*
@@
-71,6
+75,7
@@
#include "idea.h"
#include "lexer.h"
#include "name.h"
#include "idea.h"
#include "lexer.h"
#include "name.h"
+#include "netg.h"
#include "parser.h"
#include "rule.h"
#include "tx.h"
#include "parser.h"
#include "rule.h"
#include "tx.h"
@@
-79,7
+84,7
@@
/*----- Arbitrary constants -----------------------------------------------*/
/*----- Arbitrary constants -----------------------------------------------*/
-#define daemon__awakeEvery (
5 * 60)
/* Awaken this often to rescan */
+#define daemon__awakeEvery (
30 * 60)
/* Awaken this often to rescan */
/*----- Static variables --------------------------------------------------*/
/*----- Static variables --------------------------------------------------*/
@@
-286,7
+291,7
@@
void daemon_init(const char *cf, int port)
* user wants me to start on a funny port.
*/
* user wants me to start on a funny port.
*/
- set
e
uid(getuid());
+ setuid(getuid());
/* --- Initialise bits of the program --- */
/* --- Initialise bits of the program --- */
@@
-295,6
+300,7
@@
void daemon_init(const char *cf, int port)
userdb_init();
userdb_local();
userdb_yp();
userdb_init();
userdb_local();
userdb_yp();
+ netg_init();
name_init();
rule_init();
openlog(quis(), 0, LOG_DAEMON);
name_init();
rule_init();
openlog(quis(), 0, LOG_DAEMON);
@@
-423,6
+429,7
@@
void daemon_init(const char *cf, int port)
userdb_reinit();
userdb_local();
userdb_yp();
userdb_reinit();
userdb_local();
userdb_yp();
+ netg_reinit();
rule_reinit();
name_reinit();
if (daemon__readConfig(cf))
rule_reinit();
name_reinit();
if (daemon__readConfig(cf))