From 4d41fe5c72d9cd70adebf7ec688c4ed5d5097ece Mon Sep 17 00:00:00 2001 From: Johan Danielsson Date: Fri, 22 Apr 2005 15:38:33 +0000 Subject: [PATCH] read limits.conf (from /etc/security by default, overridable in login.conf) git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14887 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/login/login.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/appl/login/login.c b/appl/login/login.c index 5e6032e34..a78e9067a 100644 --- a/appl/login/login.c +++ b/appl/login/login.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997 - 2004 Kungliga Tekniska Högskolan + * Copyright (c) 1997 - 2005 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. * @@ -481,6 +481,14 @@ do_login(const struct passwd *pwd, char *tty, char *ttyn) exit(1); } #endif + if(rootlogin == 0) { + const char *file = login_conf_get_string("limits"); + if(file == NULL) + file = _PATH_LIMITS_CONF; + + read_limits_conf(file, pwd); + } + #ifdef HAVE_SETPCRED if (setpcred (pwd->pw_name, NULL) == -1) warn("setpcred(%s)", pwd->pw_name);