| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | # Copyright (c) 2007-2014 Collax GmbH | 
| 2 |  |  |  |  |  |  | package User::getgrouplist; | 
| 3 |  |  |  |  |  |  |  | 
| 4 | 3 |  |  | 3 |  | 92709 | use 5.006001; | 
|  | 3 |  |  |  |  | 12 |  | 
|  | 3 |  |  |  |  | 122 |  | 
| 5 | 3 |  |  | 3 |  | 19 | use strict; | 
|  | 3 |  |  |  |  | 5 |  | 
|  | 3 |  |  |  |  | 408 |  | 
| 6 |  |  |  |  |  |  |  | 
| 7 |  |  |  |  |  |  | require Exporter; | 
| 8 |  |  |  |  |  |  | require DynaLoader; | 
| 9 |  |  |  |  |  |  |  | 
| 10 |  |  |  |  |  |  | our @ISA = qw(Exporter DynaLoader); | 
| 11 |  |  |  |  |  |  | our @EXPORT = qw(getgrouplist); | 
| 12 |  |  |  |  |  |  |  | 
| 13 |  |  |  |  |  |  | =head1 NAME | 
| 14 |  |  |  |  |  |  |  | 
| 15 |  |  |  |  |  |  | User::getgrouplist - Interface to glibc "getgrouplist" function | 
| 16 |  |  |  |  |  |  |  | 
| 17 |  |  |  |  |  |  | =head1 VERSION | 
| 18 |  |  |  |  |  |  |  | 
| 19 |  |  |  |  |  |  | Version 1.1.1 | 
| 20 |  |  |  |  |  |  |  | 
| 21 |  |  |  |  |  |  | =cut | 
| 22 |  |  |  |  |  |  |  | 
| 23 |  |  |  |  |  |  | our $VERSION = '1.1.1'; | 
| 24 |  |  |  |  |  |  |  | 
| 25 |  |  |  |  |  |  | =head1 SYNOPSIS | 
| 26 |  |  |  |  |  |  |  | 
| 27 |  |  |  |  |  |  | use User::getgrouplist; | 
| 28 |  |  |  |  |  |  |  | 
| 29 |  |  |  |  |  |  | my $username = 'johndoe'; | 
| 30 |  |  |  |  |  |  | my @list = getgrouplist($username); | 
| 31 |  |  |  |  |  |  | print('Groups for user $username: ' . join(' ', @list) . "\n"); | 
| 32 |  |  |  |  |  |  |  | 
| 33 |  |  |  |  |  |  | =head1 Description | 
| 34 |  |  |  |  |  |  |  | 
| 35 |  |  |  |  |  |  | C is an interface for the C function | 
| 36 |  |  |  |  |  |  | available on many BSD-like Unix systems, and Linux. It returns the list of all | 
| 37 |  |  |  |  |  |  | groups a user is in. | 
| 38 |  |  |  |  |  |  |  | 
| 39 |  |  |  |  |  |  | =head1 Exports | 
| 40 |  |  |  |  |  |  |  | 
| 41 |  |  |  |  |  |  | Function C | 
| 42 |  |  |  |  |  |  |  | 
| 43 |  |  |  |  |  |  | =cut | 
| 44 |  |  |  |  |  |  |  | 
| 45 |  |  |  |  |  |  | bootstrap User::getgrouplist; | 
| 46 |  |  |  |  |  |  |  | 
| 47 |  |  |  |  |  |  | 1; |