aboutsummaryrefslogtreecommitdiff
path: root/src/limits.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/limits.c')
-rw-r--r--src/limits.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/limits.c b/src/limits.c
index 90d6459..3d430af 100644
--- a/src/limits.c
+++ b/src/limits.c
@@ -1,18 +1,18 @@
-/* This file is part of Mailfromd.
- Copyright (C) 2008 Sergey Poznyakoff
+/* This file is part of Pies.
+ Copyright (C) 2008, 2009 Sergey Poznyakoff
- This program is free software; you can redistribute it and/or modify
+ Pies is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
- This program is distributed in the hope that it will be useful,
+ Pies is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ along with Pies. If not, see <http://www.gnu.org/licenses/>. */
#include <pies.h>
@@ -50,15 +50,14 @@ do_set_limit (int rlimit, rlim_t limit)
{
struct rlimit rlim;
- MU_DEBUG2 (pies_debug, MU_DEBUG_TRACE1,
- "Setting limit %d to %lu\n", rlimit, (unsigned long) limit);
+ debug (1, ("setting limit %d to %lu", rlimit, (unsigned long) limit));
rlim.rlim_cur = limit;
rlim.rlim_max = limit;
if (setrlimit(rlimit, &rlim))
{
- mu_diag_output (MU_DIAG_NOTICE, _("error setting limit: %s"),
- mu_strerror (errno));
+ logmsg (LOG_NOTICE, _("error setting limit: %s"),
+ strerror (errno));
return 1;
}
return 0;
@@ -67,11 +66,11 @@ do_set_limit (int rlimit, rlim_t limit)
static int
set_prio (int prio)
{
- MU_DEBUG1 (pies_debug, MU_DEBUG_TRACE2, "Setting priority to %d\n", prio);
+ debug (2, ("Setting priority to %d", prio));
if (setpriority (PRIO_PROCESS, 0, prio))
{
- mu_diag_output (MU_DIAG_NOTICE, _("error setting priority: %s"),
- mu_strerror (errno));
+ logmsg (LOG_NOTICE, _("error setting priority: %s"),
+ strerror (errno));
return 1;
}
return 0;
@@ -81,7 +80,7 @@ set_prio (int prio)
static int
check_logins (const char *name, int limit)
{
- mu_diag_output (MU_DIAG_NOTICE, _("L limit is not implemented"));
+ logmsg (LOG_NOTICE, _("L limit is not implemented"));
return 0;
}
@@ -93,7 +92,7 @@ set_limits (const char *name, struct limits_rec *lrec)
if (!lrec)
return 0;
- MU_DEBUG1 (pies_debug, MU_DEBUG_TRACE2, "Setting limits for %s\n", name);
+ debug (2, ("setting limits for %s", name));
#if defined(RLIMIT_AS)
if (lrec->set & SET_LIMIT_AS)

Return to:

Send suggestions and report system problems to the System administrator.