Does anyone know if this is going to be fixed in CentOS ?
// test case code below // expected behaviour is "all good" and a return code of zero. // this works on 2.6.35-1 // does not work on 2.6.18-194.17.4.el5 from Centos 5.5
// think this bug was fixed in git commit 8948e11f450e6189a79e47d6051c3d5a0b98e3f3 // around 2.6.22 // http://www.mail-archive.com/git-commits-head@vger.kernel.org/msg11654.html
#include <fcntl.h> #include <stdio.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h>
int main(int argc, char** argv) { int fd = open("foo", O_RDONLY); if (setuid(1000)) { printf("could not setuid, run as root with correct uid\n"); return 1; }
char proc_name[1024];
sprintf(proc_name, "/proc/self/fd/%d", fd); struct stat stat_buf;
int rc = stat(proc_name, &stat_buf);
if (rc == 0) { printf("all good\n"); } else { printf("busted, could not access %s\n", proc_name); }
return rc; }
On 11/04/2010 10:36 AM, Ned Slider wrote:
On 03/11/10 22:59, Philip Manuel wrote:
Does anyone know if this is going to be fixed in CentOS ?
Only if it gets fixed in RHEL.
Did you file a bug? If so, where is it?
No I'll file a bug now, was wondering if others had seen this issue
Phil.