Replace ACTIVE cpp constant with ALLOWED
ACTIVE is a bit of a misnomer here, when what the constant is meant to represent is whether the user is allowed to login, or contiue being logged in, so it's been replaced with a more appropriate name.
This commit is contained in:
parent
8077ae6004
commit
9201509738
12
timeoutd.c
12
timeoutd.c
|
@ -63,7 +63,7 @@
|
||||||
#define MAXLINES 512
|
#define MAXLINES 512
|
||||||
#define max(a,b) ((a)>(b)?(a):(b))
|
#define max(a,b) ((a)>(b)?(a):(b))
|
||||||
|
|
||||||
#define ACTIVE 1
|
#define ALLOWED 1
|
||||||
#define IDLEMAX 2
|
#define IDLEMAX 2
|
||||||
#define SESSMAX 3
|
#define SESSMAX 3
|
||||||
#define DAYMAX 4
|
#define DAYMAX 4
|
||||||
|
@ -208,7 +208,7 @@ char *argv[];
|
||||||
argv[2]);
|
argv[2]);
|
||||||
logoff_msg(1);
|
logoff_msg(1);
|
||||||
exit(20);
|
exit(20);
|
||||||
case ACTIVE:
|
case ALLOWED:
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
syslog(LOG_DEBUG, "User %s on %s passed login check.", argv[1], argv[2]);
|
syslog(LOG_DEBUG, "User %s on %s passed login check.", argv[1], argv[2]);
|
||||||
#endif
|
#endif
|
||||||
|
@ -819,13 +819,13 @@ int session;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Otherwise, leave the poor net addict alone */
|
/* Otherwise, leave the poor net addict alone */
|
||||||
return ACTIVE;
|
return ALLOWED;
|
||||||
}
|
}
|
||||||
configline++;
|
configline++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If they do not match any entries, then they can stay on forever */
|
/* If they do not match any entries, then they can stay on forever */
|
||||||
return ACTIVE;
|
return ALLOWED;
|
||||||
}
|
}
|
||||||
|
|
||||||
void check_idle()
|
void check_idle()
|
||||||
|
@ -868,9 +868,9 @@ void check_idle()
|
||||||
|
|
||||||
sesstime = (time_now - utmpp->ut_time) / 60;
|
sesstime = (time_now - utmpp->ut_time) / 60;
|
||||||
switch (chk_timeout(user, dev, host, idle, sesstime)) {
|
switch (chk_timeout(user, dev, host, idle, sesstime)) {
|
||||||
case ACTIVE:
|
case ALLOWED:
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
syslog(LOG_DEBUG, "User %s is active.", user);
|
syslog(LOG_DEBUG, "User %s passed all checks.", user);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case IDLEMAX:
|
case IDLEMAX:
|
||||||
|
|
Loading…
Reference in a new issue