attempt to fix compilation errors on AIX
This commit is contained in:
8
aix.c
8
aix.c
@@ -40,8 +40,8 @@ __unused static const char rcsid[] = "$Sudo$";
|
|||||||
|
|
||||||
struct aix_limit {
|
struct aix_limit {
|
||||||
int resource;
|
int resource;
|
||||||
const char *soft;
|
char *soft;
|
||||||
const char *hard;
|
char *hard;
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct aix_limit aix_limits[] = {
|
static struct aix_limit aix_limits[] = {
|
||||||
@@ -56,7 +56,7 @@ static struct aix_limit aix_limits[] = {
|
|||||||
|
|
||||||
void
|
void
|
||||||
aix_setlimits(user)
|
aix_setlimits(user)
|
||||||
const char *user;
|
char *user;
|
||||||
{
|
{
|
||||||
struct rlimit rlim;
|
struct rlimit rlim;
|
||||||
int i, n;
|
int i, n;
|
||||||
@@ -65,7 +65,7 @@ aix_setlimits(user)
|
|||||||
* For each resource limit, get the soft/hard values for the user
|
* For each resource limit, get the soft/hard values for the user
|
||||||
* and set those values via setrlimit(). Must be run as euid 0.
|
* and set those values via setrlimit(). Must be run as euid 0.
|
||||||
*/
|
*/
|
||||||
for (n = 0; n < sizeof(aix_limits) / sizeof(aix_limits[0])) {
|
for (n = 0; n < sizeof(aix_limits) / sizeof(aix_limits[0]); n++) {
|
||||||
if (getuserattr(user, aix_limits[n].soft, &i, SEC_INT) != 0)
|
if (getuserattr(user, aix_limits[n].soft, &i, SEC_INT) != 0)
|
||||||
continue;
|
continue;
|
||||||
rlim.rlim_cur = i;
|
rlim.rlim_cur = i;
|
||||||
|
2
sudo.h
2
sudo.h
@@ -314,7 +314,7 @@ struct group *sudo_getgrgid __P((gid_t));
|
|||||||
void selinux_exec __P((char *, char *, char **, int));
|
void selinux_exec __P((char *, char *, char **, int));
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_GETUSERATTR
|
#ifdef HAVE_GETUSERATTR
|
||||||
void aix_setlimits __P((const char *));
|
void aix_setlimits __P((char *));
|
||||||
#endif
|
#endif
|
||||||
YY_DECL;
|
YY_DECL;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user