Displaying 2 results from an estimated 2 matches for "check_login".
2007 Dec 03
8
automatic 'verify :xhr => true' for methods ending with _xhr
hey guys,
i am writing a couple of actions which are only used with an xhr. I
''protect'' them all against a direct access with the ''verify'' method in
the controller
verify :only => ..., :xhr => true
it would be cool if the system would automatically recognize the xhr
actions and protect them ... i want to postfix methods with ''_xhr'' and
2001 Feb 08
0
openssh2.3.0p1 and /etc/limits
...ptr = (char **) &value;
+
+ prio = strtol(value, endptr, 10);
+ if ((prio == 0) && (value == *endptr))
+ return 0;
+ if (setpriority(PRIO_PROCESS, 0, prio))
+ return LOGIN_ERROR_RLIMIT;
+ return 0;
+}
+
+
+/* Counts the number of user logins and check against the limit */
+static int
+check_logins(const char *name, const char *maxlogins)
+{
+ struct utmp *ut;
+ unsigned int limit, count;
+ char **endptr = (char **) &maxlogins;
+ const char *ml_orig = maxlogins;
+
+ limit = strtol(maxlogins, endptr, 10);
+ if (limit == 0 && ml_orig == *endptr) /* no chars read */
+ return 0;
+
+...