Can anyone out there help me with this one?
 
I have a library that contains a function that does "file_ptr = popen("uncompress xyz.Z", "r");  So far so good.
One program (program-A) I run that includes this function does, in fact, uncompress the file and deliver the output to file_ptr as it should.  However a different program (program-B) that executes this function does not get the output of the uncompress.  It behaves exactly the same as if the statement looked like this: "file_ptr = popen ("garbage xyz.Z", "r");  I would have thought the value of file_ptr would have been NULL for this last one, as "garbage" does not exist.  However, file_ptr is assigned an address!  Obviously I don't know what I'm doing with this.  Now here's some data:
 
1.  Program-A is a program forked by user "airlink" group "devel".  The permissions on the file xyz.Z are such that there are read/write permissions for group "devel".  Program-A works.
2.  Program-B is a program is owned by "dick" group "devel" and is "exec'd" from a cgi-script that is kicked off by user "nouser" group "nogroup".  Program-B, however, has had the command "chmod g+s" applied to it.  It's my understanding this will cause the program to be executed as if by a user in the "devel" group. 
3.  No matter what I seem to do, I keep getting a "-1" when I do a getc(file_ptr) after the popen command.  Same exact routine executed by Program-A on same exact file gives me the first character of the uncompressed stream.
 
Anyone out there have any idea?
 
Dick

Reply via email to