Skip Menu |

This queue is for tickets about the Proc-UID CPAN distribution.

Report information
The Basics
Id: 29152
Status: new
Priority: 0/
Queue: Proc-UID

People
Owner: PJF [...] cpan.org
Requestors: DDICK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 0.04
Fixed in: (no value)



Subject: patch to fix compile warnings
tssia
Subject: proc_uid.patch
diff -Naur old/UID.c new/UID.c --- old/UID.c 2007-09-04 20:17:04.000000000 +1000 +++ new/UID.c 2007-09-04 20:15:48.000000000 +1000 @@ -148,7 +148,7 @@ int RETVAL; dXSTARG; #line 85 "UID.xs" - ret = getresuid(&ruid, &euid, &suid); + ret = getresuid((uid_t *)&ruid, (uid_t *)&euid, (uid_t *)&suid); if (ret == -1) { croak("getresuid() returned failure. Error in Proc::UID?"); } else { @@ -175,7 +175,7 @@ int RETVAL; dXSTARG; #line 102 "UID.xs" - ret = getresgid(&rgid, &egid, &sgid); + ret = getresgid((uid_t *)&rgid, (uid_t *)&egid, (uid_t *)&sgid); if (ret == -1) { croak("getresgid() returned failure. Error in Proc::UID?"); } else { @@ -409,7 +409,7 @@ if (setresuid(new_uid,new_uid,new_uid) < 0) { croak("Could not permanently drop privs."); } - if (getresuid(&ruid, &euid, &suid) < 0) { + if (getresuid((uid_t *)&ruid, (uid_t *)&euid, (uid_t *)&suid) < 0) { croak("Could not check privileges were dropped."); } if (ruid != new_uid || euid != new_uid || suid != new_uid) { @@ -447,7 +447,7 @@ #line 448 "UID.c" #line 268 "UID.xs" #ifdef SYS_setresuid - if (getresuid(&ruid, &euid, &suid) < 0) { + if (getresuid((uid_t *)&ruid, (uid_t *)&euid, (uid_t *)&suid) < 0) { croak("Could not verify privileges."); } if (setresuid(-1,suid,-1) < 0) { @@ -508,7 +508,7 @@ if (setresgid(new_gid,new_gid,new_gid) < 0) { croak("Could not permanently drop privs."); } - if (getresgid(&rgid, &egid, &sgid) < 0) { + if (getresgid((uid_t *)&rgid, (uid_t *)&egid, (uid_t *)&sgid) < 0) { croak("Could not check privileges were dropped."); } if (rgid != new_gid || egid != new_gid || sgid != new_gid) { @@ -533,7 +533,7 @@ int rgid, egid, sgid; #line 535 "UID.c" #line 329 "UID.xs" - if (getresgid(&rgid, &egid, &sgid) < 0) { + if (getresgid((uid_t *)&rgid, (uid_t *)&egid, (uid_t *)&sgid) < 0) { croak("Could not verify privileges."); } if (setresgid(-1,sgid,-1) < 0) { diff -Naur old/UID.xs new/UID.xs --- old/UID.xs 2004-08-10 10:14:45.000000000 +1000 +++ new/UID.xs 2007-09-04 20:15:47.000000000 +1000 @@ -82,7 +82,7 @@ int ret; int ruid, euid, suid; CODE: - ret = getresuid(&ruid, &euid, &suid); + ret = getresuid((uid_t *)&ruid, (uid_t *)&euid, (uid_t *)&suid); if (ret == -1) { croak("getresuid() returned failure. Error in Proc::UID?"); } else { @@ -99,7 +99,7 @@ int ret; int rgid, egid, sgid; CODE: - ret = getresgid(&rgid, &egid, &sgid); + ret = getresgid((uid_t *)&rgid, (uid_t *)&egid, (uid_t *)&sgid); if (ret == -1) { croak("getresgid() returned failure. Error in Proc::UID?"); } else { @@ -236,7 +236,7 @@ if (setresuid(new_uid,new_uid,new_uid) < 0) { croak("Could not permanently drop privs."); } - if (getresuid(&ruid, &euid, &suid) < 0) { + if (getresuid((uid_t *)&ruid, (uid_t *)&euid, (uid_t *)&suid) < 0) { croak("Could not check privileges were dropped."); } if (ruid != new_uid || euid != new_uid || suid != new_uid) { @@ -266,7 +266,7 @@ int ruid, euid, suid; CODE: #ifdef SYS_setresuid - if (getresuid(&ruid, &euid, &suid) < 0) { + if (getresuid((uid_t *)&ruid, (uid_t *)&euid, (uid_t *)&suid) < 0) { croak("Could not verify privileges."); } if (setresuid(-1,suid,-1) < 0) { @@ -312,7 +312,7 @@ if (setresgid(new_gid,new_gid,new_gid) < 0) { croak("Could not permanently drop privs."); } - if (getresgid(&rgid, &egid, &sgid) < 0) { + if (getresgid((uid_t *)&rgid, (uid_t *)&egid, (uid_t *)&sgid) < 0) { croak("Could not check privileges were dropped."); } if (rgid != new_gid || egid != new_gid || sgid != new_gid) { @@ -326,7 +326,7 @@ PREINIT: int rgid, egid, sgid; CODE: - if (getresgid(&rgid, &egid, &sgid) < 0) { + if (getresgid((uid_t *)&rgid, (uid_t *)&egid, (uid_t *)&sgid) < 0) { croak("Could not verify privileges."); } if (setresgid(-1,sgid,-1) < 0) {