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/Unicorn/Manager/CLI/Proc.pm view on Meta::CPAN
my %user_table = %{ $self->process_table->ptable };
my @users = keys %user_table;
for (@users) {
my $username = getpwuid $_;
$user_table{$username} = $user_table{$_};
delete $user_table{$_};
}
return {%user_table};
view all matches for this distribution
view release on metacpan or search on metacpan
t/unprivileged.t view on Meta::CPAN
my @current_groups = split ' ', $);
shift @current_groups;
is_deeply {map { ($_ => 1) } getgroups}, {map { ($_ => 1) } @current_groups},
'Retrieved supplementary groups';
my $username = getpwuid $>;
my $gid = (getpwnam $username)[3];
SKIP: {
skip 'getgrouplist not implemented', 6 unless eval { Unix::Groups::FFI->import('getgrouplist'); 1 };
view all matches for this distribution
view release on metacpan or search on metacpan
for (my $i=0; $i < $conf{attempts}; $i++) {
print OUTPUT $banner; # /etc/issue
if ($conf{sameuser}) {
$logintry = getpwuid($<)
|| croak "Unidentifiable user running process";
} else {
do {
print OUTPUT $conf{login};
$logintry = <INPUT>;
module provides). Here are some specifics on the function provided:
=head2 login(option => value, option => value)
This prompts for the username and password and tries to validate
the login. On success, it returns the same thing that getpwuid()
does: the username in a scalar context, or the passwd struct as
an array in a list context. It returns undef on failure.
You can pass it an optional set of parameters. These will specify
options for that login prompt only. The parameters and their default
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Unix/Mgt.pm view on Meta::CPAN
#
=head2 get
Unix::Mgt::User->get() retrieves user account information using C<getpwnam> or
C<getpwuid>. The single param for this method is either the name or the uid of
the user.
$user = Unix::Mgt::User->get('vera');
$user = Unix::Mgt::User->get('1010');
lib/Unix/Mgt.pm view on Meta::CPAN
# TESTING
# println subname(method=>1); ##i
# return
if ($name =~ m|^\d+$|s)
{ return getpwuid($name) }
else
{ return getpwnam($name) }
}
#
# fields
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Unix/Passwd/File.pm view on Meta::CPAN
summary => 'Get user details by username or uid',
description => <<'_',
Either `user` OR `uid` must be specified.
The function is not dissimilar to Unix's `getpwnam()` or `getpwuid()`.
_
args_rels => {
'choose_one' => [qw/user uid/],
},
lib/Unix/Passwd/File.pm view on Meta::CPAN
Get user details by username or uid.
Either C<user> OR C<uid> must be specified.
The function is not dissimilar to Unix's C<getpwnam()> or C<getpwuid()>.
This function is not exported by default, but exportable.
Arguments ('*' denotes required arguments):
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Unix/SetUser.pm view on Meta::CPAN
}
}
else {
# use user's primary group if no primary group specified
if ( !defined($group) ) {
$gid = (getpwuid($uid))[3];
if ( !defined($gid)) {
croak "Failed to get primary group ID for uid '$uid'";
}
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Unix/setuid.pm view on Meta::CPAN
}
{
package Unix::setuid::ruser;
sub TIESCALAR { bless [], $_[0] }
sub FETCH { my @pw = getpwuid($<); @pw ? $pw[0] : $< }
sub STORE {
if ($_[1] =~ /\A\d+\z/) {
$< = $_[1];
} else {
my @pw = getpwuid($_[1]);
die "No such user '$_[1]'" unless @pw;
$< = $pw[2];
}
}
}
{
package Unix::setuid::euser;
sub TIESCALAR { bless [], $_[0] }
sub FETCH { my @pw = getpwuid($>); @pw ? $pw[0] : $> }
sub STORE {
if ($_[1] =~ /\A\d+\z/) {
$> = $_[1];
} else {
my @pw = getpwnam($_[1]);
view all matches for this distribution
view release on metacpan or search on metacpan
if (!home)
{
struct passwd *pw;
if ((pw = getpwuid (getuid ())))
home = pw->pw_dir;
else
home = "/tmp";
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/User/AccountChecker.pm view on Meta::CPAN
=cut
sub isuser {
my ($this, $name) = @_;
return ($name eq getpwuid($<)) ? 1 : 0;
}
=head2 isroot
C<$object-E<gt>isroot()>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/User/Information/Source/POSIX.pm view on Meta::CPAN
use User::Information::Path;
our $VERSION = v0.05;
my %_keys_getpwuid = (
dir => 'filename',
shell => 'filename',
);
my @_keys_getpwuid = qw(name passwd uid gid quota comment gcos dir shell expire);
my @_keys_getgrgid = qw(name passwd gid members);
my @_keys_uname = qw(sysname nodename release version machine);
# ---- Private helpers ----
sub _load_getpwuid {
my ($base, $info, $qkey, $subroot, $uid, $root, $key) = @_;
my @d = getpwuid($uid);
for (my $i = 0; $i < scalar(@_keys_getpwuid); $i++) {
if (defined($d[$i]) && length($d[$i])) {
my $dkey = $_keys_getpwuid[$i];
my $v = {($_keys_getpwuid{$dkey} // 'raw') => $d[$i]};
$base->_value_add(User::Information::Path->new($subroot => $dkey), $v);
if ($dkey eq 'name') {
$base->_value_add(User::Information::Path->new($root => [$dkey => $key]), $v);
} elsif ($dkey eq 'gcos') {
lib/User/Information/Source/POSIX.pm view on Meta::CPAN
if ($type eq 'user' || $type eq 'real_user' || $type eq 'effective_user') {
@value = split(/\s+/, $value);
$value = $value[0];
foreach my $key (@_keys_getpwuid) {
my $path = User::Information::Path->new($subroot => $key);
push(@info, {
loadpath => $subroot,
path => $path,
loader => sub { my ($base, $info, $qkey) = @_; _load_getpwuid($base, $info, $qkey, $subroot, $value, $root, $type); },
});
}
push(@info, {
loadpath => $subroot,
path => User::Information::Path->new($root => ['name' => $type]),
loader => sub { my ($base, $info, $qkey) = @_; _load_getpwuid($base, $info, $qkey, $subroot, $value, $root, $type); },
});
push(@info, {
loadpath => $subroot,
path => User::Information::Path->new($root => ['fullname' => $type]),
loader => sub { my ($base, $info, $qkey) = @_; _load_getpwuid($base, $info, $qkey, $subroot, $value, $root, $type); },
});
} elsif ($type eq 'group' || $type eq 'real_group' || $type eq 'effective_group') {
@value = split(/\s+/, $value);
$value = $value[0];
view all matches for this distribution
view release on metacpan or search on metacpan
$loaded = 1;
print "ok 1\n";
######################### End of black magic.
$user = getlogin || getpwuid($<) || $ENV{USER};
$term = ttyname(undef);
$term =~ s|^/dev/||;
###############################################################################
view all matches for this distribution
view release on metacpan or search on metacpan
t/01-getgrouplist-for-root.t view on Meta::CPAN
my $username = undef;
my $gid;
my @ent;
@ent = getpwuid(0); # Is this a unix/linuxish O/S (includes MacOS)?
if (@ent) {
$username = 'root';
$gid = 0;
} else { # Or is it Cygwin?
my @ent = getpwuid(500); # We expect the "Administrator" account to be uid 500
$username = $ent[0];
$gid = $ent[4];
}
note("Checking user $username to be in group $gid\n");
view all matches for this distribution
view release on metacpan or search on metacpan
return "";
}
sub Login {
return getlogin || getpwuid( $< ) || $ENV{ LOGNAME } || $ENV{ USER } ||
$ENV{ USERNAME } || 'unknown';
}
1;
__END__
greatly solicited.
=item Login
Returns login id of user on either Unix or NT by checking C<getlogin>,
C<getpwuid>, and various environment variables.
=back
=head1 SEE ALSO
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Util/SelfDestruct.pm view on Meta::CPAN
use Cwd qw(abs_path);
use Fcntl qw(:DEFAULT :flock);
use constant DEBUG => $ENV{'DEBUG'} ? 1 : 0;
use constant PROGRAM_NAME => -e abs_path($0) ? abs_path($0) : undef;
use constant HOME => -d (getpwuid($>))[7] ? (getpwuid($>))[7] : $ENV{HOME};
use constant RC_FILE => HOME.'/.selfdestruct';
use vars qw($VERSION $PARAM);
$VERSION = '1.21' || sprintf('%d.%02d', q$Revision$ =~ /(\d+)/g);
$PARAM = {};
view all matches for this distribution
view release on metacpan or search on metacpan
"Environment variable \$VBHOME to an alternate location\n";
exit 1;
}
# See if we're running as the userid 'vbtk', and warn if not.
my ($uname) = getpwuid($<);
if($uname ne 'vbtk')
{
print STDOUT "\n" .
"It is recommended that you run all VB processes under a separate userid,\n" .
"such as 'vbtk'. You are currently running with the userid '$uname'.\n";
view all matches for this distribution
view release on metacpan or search on metacpan
StarTeam.pm view on Meta::CPAN
my( $self ) = ( ref( $optionRef ) eq 'HASH' ) ? $optionRef : {};
my( $username ) = $^O eq 'MSWin32' ? $ENV{'USERNAME'}
: $^O eq 'os2' ? $ENV{'USER'} || $ENV{'LOGNAME'}
: $^O eq 'MacOS' ? $ENV{'USER'}
: eval { getpwuid($<) }; # May be missing
my( %default ) = (
'batchmode' => 0,
'compress' => 0,
'host' => 'localhost',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/VSGDR/MergeData.pm view on Meta::CPAN
my $quotedCombinedTargetName = "[${targ_schema}].[${targ_table}]";
my $database = databaseName($dbh);
no warnings;
my $userName = $OSNAME eq 'MSWin32' ? eval('Win32::LoginName') : ${[getpwuid( $< )]}->[6]; $userName =~ s/,.*//;
use warnings;
use warnings;
my $date = strftime "%d/%m/%Y", localtime;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/VSGDR/StaticData.pm view on Meta::CPAN
my $quotedTable = "[${table}]";
my $database = databaseName($dbh);
no warnings;
my $userName = $OSNAME eq 'MSWin32' ? eval('Win32::LoginName') : ${[getpwuid( $< )]}->[6]; $userName =~ s/,.*//;
use warnings;
my $date = strftime "%d/%m/%Y", localtime;
my $hasId = has_idCols($dbh,$schema,$table) ;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/VSGDR/TestScriptGen.pm view on Meta::CPAN
my $database = databaseName($dbh);
no warnings;
my $userName = $OSNAME eq 'MSWin32' ? eval('Win32::LoginName') : ${[getpwuid( $< )]}->[6]; $userName =~ s/,.*//;
use warnings;
my $date = strftime "%d/%m/%Y", localtime;
#warn Dumper $userName ;
#warn Dumper $ra_columns ;
#exit ;
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/Variable/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/Variable/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
view release on metacpan or search on metacpan
lib/Video/TeletextDB/Access.pm view on Meta::CPAN
my ($user, $rest) = $file =~ m!^~([^/]*)(.*)\z!s or return $file;
if ($user ne "") {
my @pw = getpwnam($user) or croak "Could not find user $user";
$user = $pw[7];
} elsif (!defined($user = $ENV{HOME})) {
my @pw = getpwuid($>) or
croak "Could not determine who you are";
$user = $pw[7];
}
croak "Home directory is the empty string" if $user eq "";
$user =~ s!/*\z!$rest!;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/WWW/Bund.pm view on Meta::CPAN
has cache_dir => (
is => 'lazy',
builder => sub {
my $base = $ENV{XDG_CACHE_HOME}
// File::Spec->catdir($ENV{HOME} // (getpwuid($<))[7], '.cache');
File::Spec->catdir($base, 'www-bund');
},
);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/WWW/Crab/Client.pm view on Meta::CPAN
sub _get_username {
my $username = undef;
eval {
$username = scalar getpwuid($<);
};
return $username if defined $username;
eval {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/WWW/KlickTel/API.pm view on Meta::CPAN
# --- GLOBAL VARIABLES ---
my %cache_invers = ();
# system username
my $username = $ENV{LOGNAME} || $ENV{USER} || getpwuid($<);
=head1 METHODS
=head2 new
view all matches for this distribution
view release on metacpan or search on metacpan
lib/WWW/Mechanize/FormFiller/Value/Callback.pm view on Meta::CPAN
# Create a default value for the HTML field "login"
# This will put the current login name into the login field
sub find_login {
getlogin || getpwuid($<) || "Kilroy";
};
my $login = WWW::Mechanize::FormFiller::Value::Callback->new( login => \&find_login );
$f->add_value( login => $login );
lib/WWW/Mechanize/FormFiller/Value/Callback.pm view on Meta::CPAN
my $form = HTML::Form->parse('<html><body><form method=get action=/>
<input type=text name=login />
<input type=text name=password />
</form></body></html>','http://www.example.com/');
$f->fill_form($form);
my $login_str = getlogin || getpwuid($<) || "Kilroy";
is( $form->value('login'), $login_str, "Login gets set");
cmp_ok( $form->value('password'), '<', 100, "Password gets set");
cmp_ok( $form->value('password'), '>', 9, "Password gets set");
=head1 DESCRIPTION
view all matches for this distribution
view release on metacpan or search on metacpan
lib/WWW/Mechanize/Shell.pm view on Meta::CPAN
# I should just release a patch for File::Homedir then... Not now.
my $sourcefile;
if (exists $args{rcfile}) {
$sourcefile = delete $args{rcfile};
} else {
my $userhome = $^O =~ /win32/i ? $ENV{'USERPROFILE'} || $ENV{'HOME'} : ((getpwuid($<))[7]);
$sourcefile = "$userhome/.mechanizerc"
if -f "$userhome/.mechanizerc";
};
$self->option('cookiefile', $args{cookiefile}) if (exists $args{cookiefile});
$self->source_file($sourcefile) if defined $sourcefile;
view all matches for this distribution
view release on metacpan or search on metacpan
easyxs/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
easyxs/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