#include "missing.h"
#include "alloc.h"
#include "error.h"
+#include "sudo_debug.h"
#define DEFAULT_TEXT_DOMAIN "sudo"
#include "gettext.h"
aix_getlimit(char *user, char *lim, rlim64_t *valp)
{
int val;
+ debug_decl(aix_getlimit, SUDO_DEBUG_UTIL)
if (getuserattr(user, lim, &val, SEC_INT) != 0)
- return -1;
+ debug_return_int(-1);
*valp = val;
- return 0;
+ debug_return_int(0);
}
static void
struct rlimit64 rlim;
rlim64_t val;
int n;
+ debug_decl(aix_setlimits, SUDO_DEBUG_UTIL)
if (setuserdb(S_READ) != 0)
error(1, "unable to open userdb");
(void)setrlimit64(aix_limits[n].resource, &rlim);
}
enduserdb();
+ debug_return;
}
#ifdef HAVE_SETAUTHDB
aix_setauthdb(char *user)
{
char *registry;
+ debug_decl(aix_setauthdb, SUDO_DEBUG_UTIL)
if (user != NULL) {
if (setuserdb(S_READ) != 0)
}
enduserdb();
}
+ debug_return;
}
/*
void
aix_restoreauthdb(void)
{
+ debug_decl(aix_setauthdb, SUDO_DEBUG_UTIL)
+
if (setauthdb(NULL, NULL) != 0)
error(1, _("unable to restore registry"));
+
+ debug_return;
}
#endif
{
char *info;
int len;
+ debug_decl(aix_setauthdb, SUDO_DEBUG_UTIL)
/* set usrinfo, like login(1) does */
len = easprintf(&info, "NAME=%s%cLOGIN=%s%cLOGNAME=%s%cTTY=%s%c",
/* set resource limits */
aix_setlimits(user);
+
+ debug_return;
}
#endif /* HAVE_GETUSERATTR */