view release on metacpan or search on metacpan
lib/Win32/pwent.pm view on Meta::CPAN
use vars qw(@ISA @EXPORT @EXPORT_OK);
use Exporter;
@ISA = qw(Exporter);
@EXPORT = qw();
@EXPORT_OK = qw(getpwent endpwent setpwent getpwnam getpwuid getgrent entgrent setgrent getgrnam getgrgid);
use File::Spec;
use Win32;
use Win32::NetAdmin;
lib/Win32/pwent.pm view on Meta::CPAN
well known pwent and grent functions.
=head1 EXPORT
Win32::pwent doesn't export anything by default. Following function can
be imported explicitely: C<endgrent>, C<getpwent>, C<getpwnam>, C<getpwuid>,
C<entgrent>, C<getgrent>, C<getgrnam>, C<getgrgid>
=head1 SUBROUTINES/METHODS
All exported subroutines behaves as the same ones for Unix-like systems
lib/Win32/pwent.pm view on Meta::CPAN
Fetches the user (by name) entry from LANMAN user database and return it
see L<http://perldoc.perl.org/functions/getpwnam.html>
=head2 getpwuid
fetches the user (by user id) entry from LANMAN user database and return it
see L<http://perldoc.perl.org/functions/getpwuid.html>
=head2 getgrent
Return the next group entry from LANMAN group database. If this is the first
call to C<getgrent> (or the first call after an C<endgrent> call), a group
lib/Win32/pwent.pm view on Meta::CPAN
my $userName = $_[0];
my $pwent = _fillpwent( $userName );
return wantarray ? @$pwent : $pwent->[2];
}
sub getpwuid
{
my $uid = $_[0];
my $pwents = _fillpwents();
my @uid_pwents = grep { $uid == $_->[2] } @$pwents;
my @pwent = @{$uid_pwents[0]} if( 1 <= scalar(@uid_pwents) );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Ewindows1250.pm view on Meta::CPAN
### More-desperate methods
# Light desperation on any (Unixish) platform
else {
$home = CORE::eval q{ (getpwuid($<))[7] };
}
# On Unix in general, a non-existant home means "no home"
# For example, "nobody"-like users might use /nonexistant
if (defined $home and ! -d($home)) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Ewindows1252.pm view on Meta::CPAN
### More-desperate methods
# Light desperation on any (Unixish) platform
else {
$home = CORE::eval q{ (getpwuid($<))[7] };
}
# On Unix in general, a non-existant home means "no home"
# For example, "nobody"-like users might use /nonexistant
if (defined $home and ! -d($home)) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Ewindows1254.pm view on Meta::CPAN
### More-desperate methods
# Light desperation on any (Unixish) platform
else {
$home = CORE::eval q{ (getpwuid($<))[7] };
}
# On Unix in general, a non-existant home means "no home"
# For example, "nobody"-like users might use /nonexistant
if (defined $home and ! -d($home)) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Ewindows1257.pm view on Meta::CPAN
### More-desperate methods
# Light desperation on any (Unixish) platform
else {
$home = CORE::eval q{ (getpwuid($<))[7] };
}
# On Unix in general, a non-existant home means "no home"
# For example, "nobody"-like users might use /nonexistant
if (defined $home and ! -d($home)) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Ewindows1258.pm view on Meta::CPAN
### More-desperate methods
# Light desperation on any (Unixish) platform
else {
$home = CORE::eval q{ (getpwuid($<))[7] };
}
# On Unix in general, a non-existant home means "no home"
# For example, "nobody"-like users might use /nonexistant
if (defined $home and ! -d($home)) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Wireguard/WGmeta/Cli/Commands/Command.pm view on Meta::CPAN
Exception if the user has insufficient privileges .
=cut
sub check_privileges($self) {
if (not -w $self->{wireguard_home}) {
my $username = getpwuid($<);
die "Insufficient privileges - `$username` has no rw permissions to `$self->{wireguard_home}`. You probably forgot `sudo`";
}
}
sub _retrieve_or_die($self, $ref_array, $idx) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Wx/DemoModules/wxPropertyGrid.pm view on Meta::CPAN
$pg->Append( Wx::PropertyCategory->new('Environment','Environment') );
$pg->Append( Wx::StringProperty->new('Operating System','Operating System',Wx::GetOsDescription()) );
$pg->Append( Wx::StringProperty->new('User Name','User Name',
( Wx::wxMSW() ) ? getlogin : (getpwuid($<))[0] ) );
$pg->Append( Wx::DirProperty->new('User Local Data Directory','UserLocalDataDir',
Wx::StandardPaths::Get()->GetUserLocalDataDir ) );
#// Disable some of them
$pg->DisableProperty( 'Operating System' );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Wx/Perl/Packager/Base.pm view on Meta::CPAN
# determine where the standard PDK path is
# get a unique extract directory for this application build
my $runtime = $self->get_runtime();
my $uid = getlogin || (getpwuid($<))[0];
my $toplevel = 'wxppl-' . $uid;
$toplevel =~ s/[^A-Za-z0-9\-_]/_/g;
my $apprelocatedir;
view all matches for this distribution
view release on metacpan or search on metacpan
tools/perl_editor.pl view on Meta::CPAN
endhostent endnetent endprotoent endpwent endservent eof eq eval
exec exists exit exp fcntl fileno flock for foreach fork format
formline ge getc getgrent getgrgid getgrnam gethostbyaddr gethostbyname
gethostent getlogin getnetbyaddr getnetbyname getnetent getpeername
getpgrp getppid getpriority getprotobyname getprotobynumber getprotoent
getpwent getpwnam getpwuid getservbyname getservbyport getservent
getsockname getsockopt glob gmtime goto grep gt hex if index
int ioctl join keys kill last lc lcfirst le length link listen
local localtime lock log lstat lt map mkdir msgctl msgget msgrcv
msgsnd my ne next no not oct open opendir or ord our pack package
pipe pop pos print printf prototype push quotemeta qu
view all matches for this distribution
view release on metacpan or search on metacpan
examples/upload.pl view on Meta::CPAN
't' => 'Thermal',
'v' => 'VSA',
'p' => 'Performance' );
my $hostname = Sys::Hostname::hostname();
my @userinfo = getpwuid($<);
my $cp_prg = find_executable("cp");
my $metaphase_login;
my $metaphase_password;
examples/upload.pl view on Meta::CPAN
sub canonical_file_owner {
my($uid, $gid) = @_;
if (!exists $uid_to_name{$uid}) {
my @info = getpwuid($uid);
$uid_to_name{$uid} = $info[0];
}
$uid = $uid_to_name{$uid};
if (!exists $gid_to_name{$gid}) {
view all matches for this distribution
view release on metacpan or search on metacpan
}
sub sawfish_socket_name {
my ($display) = @_;
my $socket = sprintf("/tmp/.sawfish-%s/%s",
(getpwuid($<))[0], canonical_display_name($display));
return($socket);
}
sub get_server_version {
my ($self) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
GETPWENT_R_PROTO|5.008000|5.008000|Vn
getpwnam|5.009000||Viu
GETPWNAM_R_HAS_BUFFER|5.008000||Viu
GETPWNAM_R_HAS_PTR|5.008000||Viu
GETPWNAM_R_PROTO|5.008000|5.008000|Vn
getpwuid|5.009000||Viu
GETPWUID_R_HAS_PTR|5.008000||Viu
GETPWUID_R_PROTO|5.008000|5.008000|Vn
get_quantifier_value|5.033006||Viu
get_re_arg|||xciu
get_re_gclass_nonbitmap_data|5.031011||Viu
KEY_getprotobyname|5.003007||Viu
KEY_getprotobynumber|5.003007||Viu
KEY_getprotoent|5.003007||Viu
KEY_getpwent|5.003007||Viu
KEY_getpwnam|5.003007||Viu
KEY_getpwuid|5.003007||Viu
KEY_getservbyname|5.003007||Viu
KEY_getservbyport|5.003007||Viu
KEY_getservent|5.003007||Viu
KEY_getsockname|5.003007||Viu
KEY_getsockopt|5.003007||Viu
view all matches for this distribution
view release on metacpan or search on metacpan
GETPWENT_R_PROTO|5.008000|5.008000|Vn
getpwnam|5.009000||Viu
GETPWNAM_R_HAS_BUFFER|5.008000||Viu
GETPWNAM_R_HAS_PTR|5.008000||Viu
GETPWNAM_R_PROTO|5.008000|5.008000|Vn
getpwuid|5.009000||Viu
GETPWUID_R_HAS_PTR|5.008000||Viu
GETPWUID_R_PROTO|5.008000|5.008000|Vn
get_quantifier_value|5.033006||Viu
get_re_arg|||xciu
get_re_gclass_nonbitmap_data|5.031011||Viu
KEY_getprotobyname|5.003007||Viu
KEY_getprotobynumber|5.003007||Viu
KEY_getprotoent|5.003007||Viu
KEY_getpwent|5.003007||Viu
KEY_getpwnam|5.003007||Viu
KEY_getpwuid|5.003007||Viu
KEY_getservbyname|5.003007||Viu
KEY_getservbyport|5.003007||Viu
KEY_getservent|5.003007||Viu
KEY_getsockname|5.003007||Viu
KEY_getsockopt|5.003007||Viu
view all matches for this distribution
view release on metacpan or search on metacpan
lib/XAS/Lib/Modules/Environment.pm view on Meta::CPAN
$self->{'mxmailer'} = defined($ENV{'XAS_MXMAILER'})
? $ENV{'XAS_MXMAILER'}
: 'sendmail';
$self->{'username'} = getpwuid($<);
}
# build some common paths
view all matches for this distribution
view release on metacpan or search on metacpan
examples/directory-as-atom.pl view on Meta::CPAN
$w->dataElement('generator', 'Old-skool directory-based CMS');
$w->emptyTag('link', 'rel' => 'self', 'href' => $feedUrl) if $feedUrl;
$w->dataElement([$ATOM, 'updated'] => toIsoDate(time));
# Find out the directory owner's name
if (my ($name) = (getpwuid($uid))[0]) {
$w->startTag([$ATOM, 'author']);
$w->dataElement([$ATOM, 'name'], $name);
$w->endTag([$ATOM, 'author']);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/XML/XSH2/Functions.pm view on Meta::CPAN
# $filename =~ s{ ^ ~ ( [^/]* ) }
# { $1
# ? (getpwnam($1))[7]
# : ( $ENV{HOME} || $ENV{LOGDIR}
# || (getpwuid($>))[7]
# )
# }ex;
return $filename;
}
view all matches for this distribution
view release on metacpan or search on metacpan
GETPWENT_R_PROTO|5.008000|5.008000|Vn
getpwnam|5.009000||Viu
GETPWNAM_R_HAS_BUFFER|5.008000||Viu
GETPWNAM_R_HAS_PTR|5.008000||Viu
GETPWNAM_R_PROTO|5.008000|5.008000|Vn
getpwuid|5.009000||Viu
GETPWUID_R_HAS_PTR|5.008000||Viu
GETPWUID_R_PROTO|5.008000|5.008000|Vn
get_quantifier_value|5.033006||Viu
get_re_arg|||xciu
get_re_gclass_nonbitmap_data|5.031011||Viu
KEY_getprotobyname|5.003007||Viu
KEY_getprotobynumber|5.003007||Viu
KEY_getprotoent|5.003007||Viu
KEY_getpwent|5.003007||Viu
KEY_getpwnam|5.003007||Viu
KEY_getpwuid|5.003007||Viu
KEY_getservbyname|5.003007||Viu
KEY_getservbyport|5.003007||Viu
KEY_getservent|5.003007||Viu
KEY_getsockname|5.003007||Viu
KEY_getsockopt|5.003007||Viu
view all matches for this distribution
view release on metacpan or search on metacpan
libuv-1.49.2/ChangeLog view on Meta::CPAN
* build: remove Windows 2016 workflows (Darshan Sen)
* Revert "win,errors: remap ERROR_ACCESS_DENIED to UV_EACCES" (Darshan Sen)
* unix: simplify getpwuid call (Jameson Nash)
* build: filter CI by paths and branches (Jameson Nash)
* build: add iOS to macos CI (Jameson Nash)
libuv-1.49.2/ChangeLog view on Meta::CPAN
* unix,process: add uv__write_errno helper function (Ricky Zhou)
* Re-merge "unix,stream: clear read/write states on close/eof" (Jameson Nash)
* unix,core: fix errno handling in uv__getpwuid_r (Darshan Sen)
* errors: map ESOCKTNOSUPPORT errno (Ryan Liptak)
* doc: uv_read_stop always succeeds (Simon Kissane)
libuv-1.49.2/ChangeLog view on Meta::CPAN
Changes since version 1.14.1:
* unix: limit uv__has_forked_with_cfrunloop to macOS (Kamil Rytarowski)
* win: fix buffer size in uv__getpwuid_r() (tux.uudiin)
* win,tty: improve SIGWINCH support (Bartosz Sosnowski)
* unix: use fchmod() in uv_fs_copyfile() (cjihrig)
view all matches for this distribution
view release on metacpan or search on metacpan
Config_xs.in view on Meta::CPAN
d_getprotoprotos, T_INV,0,ALN64I"@@d_getprotoprotos@@"
d_getprpwnam, T_INV,0,ALN64I"@@d_getprpwnam@@"
d_getpwent, T_INV,0,ALN64I"@@d_getpwent@@"
d_getpwent_r, T_INV,0,ALN64I"@@d_getpwent_r@@"
d_getpwnam_r, T_INV,0,ALN64I"@@d_getpwnam_r@@"
d_getpwuid_r, T_INV,0,ALN64I"@@d_getpwuid_r@@"
d_getsbyname, T_INV,0,ALN64I"@@d_getsbyname@@"
d_getsbyport, T_INV,0,ALN64I"@@d_getsbyport@@"
d_getsent, T_INV,0,ALN64I"@@d_getsent@@"
d_getservbyname_r, T_INV,0,ALN64I"@@d_getservbyname_r@@"
d_getservbyport_r, T_INV,0,ALN64I"@@d_getservbyport_r@@"
Config_xs.in view on Meta::CPAN
getprotobyname_r_proto, T_INV,0,ALN64I"@@getprotobyname_r_proto@@"
getprotobynumber_r_proto, T_INV,0,ALN64I"@@getprotobynumber_r_proto@@"
getprotoent_r_proto, T_INV,0,ALN64I"@@getprotoent_r_proto@@"
getpwent_r_proto, T_INV,0,ALN64I"@@getpwent_r_proto@@"
getpwnam_r_proto, T_INV,0,ALN64I"@@getpwnam_r_proto@@"
getpwuid_r_proto, T_INV,0,ALN64I"@@getpwuid_r_proto@@"
getservbyname_r_proto, T_INV,0,ALN64I"@@getservbyname_r_proto@@"
getservbyport_r_proto, T_INV,0,ALN64I"@@getservbyport_r_proto@@"
getservent_r_proto, T_INV,0,ALN64I"@@getservent_r_proto@@"
getspnam_r_proto, T_INV,0,ALN64I"@@getspnam_r_proto@@"
gidformat, T_INV,0,ALN64I"@@gidformat@@"
view all matches for this distribution
view release on metacpan or search on metacpan
GETPWENT_R_PROTO|5.008000|5.008000|Vn
getpwnam|5.009000||Viu
GETPWNAM_R_HAS_BUFFER|5.008000||Viu
GETPWNAM_R_HAS_PTR|5.008000||Viu
GETPWNAM_R_PROTO|5.008000|5.008000|Vn
getpwuid|5.009000||Viu
GETPWUID_R_HAS_PTR|5.008000||Viu
GETPWUID_R_PROTO|5.008000|5.008000|Vn
get_re_arg|||xciu
get_re_gclass_nonbitmap_data|5.031010||Viu
get_regclass_nonbitmap_data|5.031010||Viu
KEY_getprotobyname|5.003007||Viu
KEY_getprotobynumber|5.003007||Viu
KEY_getprotoent|5.003007||Viu
KEY_getpwent|5.003007||Viu
KEY_getpwnam|5.003007||Viu
KEY_getpwuid|5.003007||Viu
KEY_getservbyname|5.003007||Viu
KEY_getservbyport|5.003007||Viu
KEY_getservent|5.003007||Viu
KEY_getsockname|5.003007||Viu
KEY_getsockopt|5.003007||Viu
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Youri/Package/RPM/Updater.pm view on Meta::CPAN
sub _get_packager {
my ($self) = @_;
my $packager = $wrapper_class->expand_macro('%packager');
if ($packager eq '%packager') {
my $login = (getpwuid($<))[0];
$packager = $ENV{EMAIL} ? "$login <$ENV{EMAIL}>" : $login;
}
return $packager;
}
view all matches for this distribution
view release on metacpan or search on metacpan
deps/libzmq/src/ipc_listener.cpp view on Meta::CPAN
return true;
const struct passwd *pw;
const struct group *gr;
if (!(pw = getpwuid (cred.uid)))
return false;
for (options_t::ipc_gid_accept_filters_t::const_iterator
it = options.ipc_gid_accept_filters.begin (),
end = options.ipc_gid_accept_filters.end ();
it != end; it++) {
view all matches for this distribution
view release on metacpan or search on metacpan
# ############### #
# set environment #
# ############### #
my @user_info = getpwuid($>);
$ENV{USER} ||= $user_info[0];
$ENV{HOME} ||= $user_info[7];
$ENV{ZOID} = $0; # _Don't_ change this to ENV{SHELL} !
# fix environment
view all matches for this distribution
view release on metacpan or search on metacpan
script/zonemaster-cli view on Meta::CPAN
}
# Load default arguments from file in home directory, if any
# This must be loaded before any global file to make the local
# file take precedence
my $home_dir = ( ( getpwuid( $< ) )[7] ) || $ENV{HOME};
my $home_conf_file = File::Spec->catfile( $home_dir, '.zonemaster', 'cli.args' );
if ( -r $home_conf_file ) {
my @lines = read_conf_file( $home_conf_file );
unshift @ARGV, @lines;
view all matches for this distribution
view release on metacpan or search on metacpan
GETPWENT_R_PROTO|5.008000|5.008000|Vn
getpwnam|5.009000||Viu
GETPWNAM_R_HAS_BUFFER|5.008000||Viu
GETPWNAM_R_HAS_PTR|5.008000||Viu
GETPWNAM_R_PROTO|5.008000|5.008000|Vn
getpwuid|5.009000||Viu
GETPWUID_R_HAS_PTR|5.008000||Viu
GETPWUID_R_PROTO|5.008000|5.008000|Vn
get_quantifier_value|5.033006||Viu
get_re_arg|||xciu
get_re_gclass_nonbitmap_data|5.031011||Viu
KEY_getprotobyname|5.003007||Viu
KEY_getprotobynumber|5.003007||Viu
KEY_getprotoent|5.003007||Viu
KEY_getpwent|5.003007||Viu
KEY_getpwnam|5.003007||Viu
KEY_getpwuid|5.003007||Viu
KEY_getservbyname|5.003007||Viu
KEY_getservbyport|5.003007||Viu
KEY_getservent|5.003007||Viu
KEY_getsockname|5.003007||Viu
KEY_getsockopt|5.003007||Viu
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Zonemaster/Config.pm view on Meta::CPAN
push @dirlist, dist_dir( 'Zonemaster' );
push @dirlist, '/etc/zonemaster';
push @dirlist, '/usr/local/etc/zonemaster';
my $dir = ( getpwuid( $> ) )[7];
if ( $dir ) {
push @dirlist, $dir . '/.zonemaster';
}
return @dirlist;
view all matches for this distribution
view release on metacpan or search on metacpan
local/lib/perl5/B/Keywords.pm view on Meta::CPAN
getprotobyname
getprotobynumber
getprotoent
getpwent
getpwnam
getpwuid
getservbyname
getservbyport
getservent
getsockname
getsockopt ),
view all matches for this distribution
view release on metacpan or search on metacpan
GETPWENT_R_PROTO|5.008000|5.008000|Vn
getpwnam|5.009000||Viu
GETPWNAM_R_HAS_BUFFER|5.008000||Viu
GETPWNAM_R_HAS_PTR|5.008000||Viu
GETPWNAM_R_PROTO|5.008000|5.008000|Vn
getpwuid|5.009000||Viu
GETPWUID_R_HAS_PTR|5.008000||Viu
GETPWUID_R_PROTO|5.008000|5.008000|Vn
get_quantifier_value|5.033006||Viu
get_re_arg|||xciu
get_re_gclass_nonbitmap_data|5.031011||Viu
KEY_getprotobyname|5.003007||Viu
KEY_getprotobynumber|5.003007||Viu
KEY_getprotoent|5.003007||Viu
KEY_getpwent|5.003007||Viu
KEY_getpwnam|5.003007||Viu
KEY_getpwuid|5.003007||Viu
KEY_getservbyname|5.003007||Viu
KEY_getservbyport|5.003007||Viu
KEY_getservent|5.003007||Viu
KEY_getsockname|5.003007||Viu
KEY_getsockopt|5.003007||Viu
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ppport.h view on Meta::CPAN
GETPWENT_R_PROTO|5.008000|5.008000|Vn
getpwnam|5.009000||Viu
GETPWNAM_R_HAS_BUFFER|5.008000||Viu
GETPWNAM_R_HAS_PTR|5.008000||Viu
GETPWNAM_R_PROTO|5.008000|5.008000|Vn
getpwuid|5.009000||Viu
GETPWUID_R_HAS_PTR|5.008000||Viu
GETPWUID_R_PROTO|5.008000|5.008000|Vn
get_quantifier_value|5.033006||Viu
get_re_arg|||xciu
get_re_gclass_nonbitmap_data|5.031011||Viu
lib/ppport.h view on Meta::CPAN
KEY_getprotobyname|5.003007||Viu
KEY_getprotobynumber|5.003007||Viu
KEY_getprotoent|5.003007||Viu
KEY_getpwent|5.003007||Viu
KEY_getpwnam|5.003007||Viu
KEY_getpwuid|5.003007||Viu
KEY_getservbyname|5.003007||Viu
KEY_getservbyport|5.003007||Viu
KEY_getservent|5.003007||Viu
KEY_getsockname|5.003007||Viu
KEY_getsockopt|5.003007||Viu
view all matches for this distribution