Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Unix::Groups(3)	      User Contributed Perl Documentation      Unix::Groups(3)

NAME
       Unix::Groups - Perl to support "getgroups" and "setgroups" syscalls

SYNOPSIS
	use Unix::Groups qw/:all/;

	$ngroups_max=NGROUPS_MAX;
	@gids=getgroups;
	$success=setgroups(@gids);

DESCRIPTION
       This module implements a	very thin layer	around the getgroups(2)	and
       setgroups(2) syscalls. See your system manual for more information.

       Note, the module	is written and tested on Linux.	For other UNIX-like
       systems there are good chances that it will work	at least if it
       compiles	properly.

   Functions
       $n=NGROUPS_MAX

       returns the max.	number of arguments that "setgroups" will accept.

       @gids=getgroups

       returns the list	of supplementary group IDs of the current process.  It
       is very similar to the $( variable. But $( is a string and its first
       element is the current effective	GID.

       $success=setgroups @gids

       sets the	list of	supplementary group IDs	of the current process.	 On
       most systems this is a privileged operation. On Linux "CAP_SETGID" is
       required.

   EXPORT
       None by default.

       On demand all functions are exported.

       Export tags

       :all
	   export all functions.

SEE ALSO
       Linux manual.

AUTHOR
       Torsten FA<paragraph>rtsch, <torsten.foertsch@gmx.net>

COPYRIGHT AND LICENSE
       Copyright (C) 2011 by Torsten Foertsch

       This library is free software; you can redistribute it and/or modify it
       under the same terms as Perl itself, either Perl	version	5.12.3 or, at
       your option, any	later version of Perl 5	you may	have available.

perl v5.32.0			  2011-03-10		       Unix::Groups(3)

NAME | SYNOPSIS | DESCRIPTION | SEE ALSO | AUTHOR | COPYRIGHT AND LICENSE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Unix::Groups&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help