You are here: Re: [PHP] posix_getgroups() and effective grooup id's « PHP « IT news, forums, messages
Re: [PHP] posix_getgroups() and effective grooup id's

Posted by Richard Lynch on 10/02/10 11:10

> 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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация