Re: posix_getgroups() and effective grooup id's

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Hello,
>
> while I can use posix_getgroups() to get groups additional to the
> posix_getgid() value, I don't know which function to use to find out the
> groups additional to posix_getegid(). There's no posix_getegroups()
> function.

You may be stuck with:
<?php
  $uid = posix_getuid();
  exec("groups $uid", $output, $error);
  if ($error) echo "OS Error: $error<br />\n";
  echo implode("<br />", $output);
?>

You'd want to do more than just echo the output, of course.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux