view release on metacpan or search on metacpan
lib/Server/Control.pm view on Meta::CPAN
if ( ( $eid || $uid ) && $proc->uid != $uid && !$self->use_sudo() ) {
$log->warnf(
"warning: process %d is owned by uid %d ('%s'), different than current user %d ('%s'); may not be able to stop server",
$proc->pid,
$proc->uid,
scalar( getpwuid( $proc->uid ) ),
$uid,
scalar( getpwuid($uid) )
);
}
}
sub _find_process {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Setup/File.pm view on Meta::CPAN
my ($orig_uid, $orig_uname);
if (defined $orig_owner) {
if ($orig_owner =~ /\A\d+\z/) {
$orig_uid = $orig_owner;
my @ent = getpwuid($orig_uid);
$orig_uname = $ent[0] if @ent;
} else {
$orig_uname = $orig_owner;
my @ent = getpwnam($orig_uname);
return [412, "User doesn't exist: $orig_uname"] unless @ent;
lib/Setup/File.pm view on Meta::CPAN
my ($want_uid, $want_uname);
if (defined $want_owner) {
if ($want_owner =~ /\A\d+\z/) {
$want_uid = $want_owner;
my @ent = getpwuid($want_uid);
$want_uname = $ent[0] if @ent;
} else {
$want_uname = $want_owner;
my @ent = getpwnam($want_uname);
return [412, "User doesn't exist: $want_uname"] unless @ent;
view all matches for this distribution
view release on metacpan or search on metacpan
'$' => $$,
'w' => cwd,
'W' => basename(cwd),
'0' => $self->progname,
'!' => $self->prompt_no,
'u' => scalar getpwuid($<),
'g' => scalar getgrgid($(),
'c' => ref($self),
'h' => hostname,
'H' => hostfqdn,
};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Shell/Guess.pm view on Meta::CPAN
my $username = shift || $ENV{USER} || $ENV{USERNAME} || $ENV{LOGNAME};
unless(defined $username)
{
$username = eval { getpwuid $< };
}
if($^O eq 'darwin')
{
my $command = `dscl . -read /Users/$username UserShell`;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Shipwright/Util.pm view on Meta::CPAN
=cut
sub user_home {
return $ENV{HOME} if $ENV{HOME};
my $home = eval { (getpwuid $<)[7] };
if ( $@ ) {
confess_or_die "can't find user's home, please set it by env HOME";
}
else {
return $home;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Sidef.pm view on Meta::CPAN
$ENV{HOME}
|| $ENV{LOGDIR}
|| (
$^O eq 'MSWin32'
? '\Local Settings\Application Data'
: eval { ((getpwuid($<))[7] || `echo -n ~`) }
)
|| File::Spec->curdir()
),
'.config',
'sidef'
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/Esjis.pm view on Meta::CPAN
};
}
# Desperation on any platform
SCOPE: {
# On some platforms getpwuid dies if called at all
local $SIG{'__DIE__'} = '';
my $home = CORE::eval q{ (getpwuid($<))[7] };
return $home if $home and Esjis::d($home);
}
croak "Could not locate current user's home directory";
}
lib/Esjis.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 ! Esjis::d($home)) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Slackware/SBoKeeper/Home.pm view on Meta::CPAN
use warnings;
use Exporter 'import';
our @EXPORT = qw($HOME);
our $HOME = $ENV{HOME} || (getpwuid($<))[7]
or die "Could not find home directory\n";
1;
=head1 NAME
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Slovo/resources/public/js/editormd/lib/codemirror/modes.min.js view on Meta::CPAN
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../lib/codemirror")):"function"==typeof define&&define.amd?define(["../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.modeInfo=[{name:"APL",mime:"text/apl",mode:...
e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror...
multiLineStrings:!0,blockKeywords:t("catch class do else finally for forSome if match switch try while"),atoms:t("true false null"),indentStatements:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return e.match('""')...
trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside}},token:function(e,t){if(t.formatting=!1,e.sol()){var r=!!t.header;if(t.header=0,e.match(/^\s*$/,!0)||r)return t.prevLineHasContent=!1,a(t),r?this.token(e...
return{startState:function(e){return{tokenize:n,baseIndent:e||0,stack:[]}},token:function(e,t){if(e.eatSpace())return null;s=null;var r=t.tokenize(e,t),n=t.stack[t.stack.length-1];return"hash"==s&&"rule"==n?r="atom":"variable"==r&&("rule"==n?r="numbe...
a="meta",(t.match(/^latex\s*$/)||r.tmp_stex)&&(r.tmp_stex=void 0,u(r,l,{mode:h,local:e.startState(h)}));break;case 2:u(r,i,c(L,3)),(t.match(/^python\s*$/)||r.tmp_py)&&(r.tmp_py=void 0,u(r,l,{mode:m,local:e.startState(m)}));break;default:u(r,n)}else i...
return S(r[n])?r[n]:!1}function C(e,t,r){for(var n=e.length-1;n>-1;n--)if(c(e[n][t],r))return n;return!1}function S(e){return e!==!1&&null!=e}var T=["-type","-spec","-export_type","-opaque"],M=["after","begin","catch","case","cond","end","fun","if","...
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/Software/Packager/Object/Aix.pm view on Meta::CPAN
if ($value)
{
# if we only have digits then get the name.
if ($value =~ /^\d+$/)
{
$value = getpwuid($value);
}
$self->{'USER'} = $value;
}
else
{
unless (scalar $self->{'USER'})
{
$self->{'USER'} = getpwuid($<);
}
return $self->{'USER'};
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Software/Packager/Rpm.pm view on Meta::CPAN
# here is where we specify all the installable objects
print SPEC "\%files\n";
foreach my $object ($self->get_directory_objects(), $self->get_file_objects(), $self->get_link_objects())
{
my $destination = $object->destination();
my $user = getpwuid($object->user());
my $group = getgrgid($object->group());
my $mode = $object->mode();
print SPEC "\%attr($mode, $user, $group)";
print SPEC " \%" . $object->kind() if $object->kind();
print SPEC " /$destination\n"
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Software/Packager/Object/Solaris.pm view on Meta::CPAN
{
$data{'PART'} = 1;
}
$data{'CLASS'} = "none" unless scalar $data{'CLASS'};
$data{'USER'} = getpwuid($<) unless $data{'USER'};
unless ($data{'GROUP'})
{
my $groups = $(;
my ($group, $crap) = split / /, $groups;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Software/Packager/Object/Svr4.pm view on Meta::CPAN
my $self = shift;
my $value = shift;
$self->{USER} = $value
if $value;
$self->{USER} ||= [getpwuid([lstat($self->source)]->[4])]->[0];
return $self->{USER};
}
sub group
{
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Spreadsheet/Edit/IO.pm view on Meta::CPAN
my ($uid) = @_;
$uid //= eval{ $> } // -1; # default to EUID
state $answer = {};
return $answer->{$uid} //= do {
# https://stackoverflow.com/questions/12081246/how-to-get-system-user-full-name-on-windows-in-perl
eval { getpwuid($uid) // $uid }
||
($^O =~ /MSWin/ && $uid == (eval{$>}//-1) && eval{ # untested...
require Win32API::Net;
Win32API::Net::UserGetInfo($ENV{LOGONSERVER}||'',Win32::LoginName(),10,my $info={});
$info->{fullName}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Stem/Boot.pm view on Meta::CPAN
my $cmd ;
if ( my $user = $self->{'user'} ) {
if ( getpwuid($<) ne $user ) {
$cmd .= "su - $user ; " ;
}
}
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
# Replace tilde with home path.
$path =~ s{ ^ ~ ( [^/]* ) }
{ $1
? (getpwnam($1))[7]
: ( $ENV{HOME} || $ENV{LOGDIR}
|| (getpwuid($<))[7]
)
}ex;
# Replace espaced tilde with regular tilde.
$path =~ s/\\~/~/g;
return $path
view all matches for this distribution
view release on metacpan or search on metacpan
# ----------------------------------------------------------------------
# Version 1.14 December 22, 2005
# ----------------------------------------------------------------------
* Updated tests so that 04subrefs.t no longer fails if getpwuid is not
defined. RT#2083.
# ----------------------------------------------------------------------
# Version 1.13 February 11, 2002
# ----------------------------------------------------------------------
view all matches for this distribution
view release on metacpan or search on metacpan
t/01_warnings.t view on Meta::CPAN
Useless use of localtime in void context at - line 48.
Useless use of gmtime in void context at - line 49.
Useless use of getgrnam in void context at - line 50.
Useless use of getgrgid in void context at - line 51.
Useless use of getpwnam in void context at - line 52.
Useless use of getpwuid in void context at - line 53.
Useless use of subroutine prototype in void context at - line 54.
Useless use of sort in scalar context at - line 3.
Useless use of string in void context at - line 3.
Useless use of telldir in void context at - line 13.
Useless use of getppid in void context at - line 13.
t/01_warnings.t view on Meta::CPAN
Useless use of localtime in void context at - line 48.
Useless use of gmtime in void context at - line 49.
Useless use of getgrnam in void context at - line 50.
Useless use of getgrgid in void context at - line 51.
Useless use of getpwnam in void context at - line 52.
Useless use of getpwuid in void context at - line 53.
Useless use of subroutine prototype in void context at - line 54.
Useless use of sort in scalar context at - line 3.
Useless use of string in void context at - line 3.
Useless use of telldir in void context at - line 13.
Useless use of getppid in void context at - line 13.
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
[ sub { each %h }, { 0 => 0.5, 2 => 0.5 } ],
[ sub { stat $0 }, { 0 => 0.5, 13 => 0.5 } ],
[ sub { do { getpwnam 'root' } }, { 0 => 0.5, 10 => 0.5 } ],
[ sub { 1; getpwuid '0' }, { 0 => 0.5, 10 => 0.5 } ],
[ sub { eval { return getpwent } }, { 0 => 0.5, 10 => 0.5 } ],
[ sub { do { getgrnam 'root' } }, { 0 => 0.5, 4 => 0.5 } ],
[ sub { 1; getgrgid '0' }, { 0 => 0.5, 4 => 0.5 } ],
[ sub { eval { return getgrent } }, { 0 => 0.5, 4 => 0.5 } ],
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Sudo.pm view on Meta::CPAN
# test for remote execution ... you need to have the ssh keys
# setup before this ...
#$remote_machine=$self->{hostname}if (defined($self->{hostname}));
if (defined($remote_machine))
{
$remote_user = getpwuid($<); # default user name is the user running the script
if (defined($self->{username}))
{
$remote_user = $self->{username};
}
push @cmd,"ssh";
view all matches for this distribution
view release on metacpan or search on metacpan
File/File.xs view on Meta::CPAN
if (oflags & O_CREAT && creator == NULL) {
uid_t uid;
struct passwd *pwent;
uid = getuid();
if ((pwent = getpwuid(uid)) == NULL) {
snprintf(user, sizeof (user), "%d", uid);
} else {
strlcpy(user, pwent->pw_name, sizeof (user));
}
creator = user;
view all matches for this distribution
view release on metacpan or search on metacpan
$linelen += length($comment) + 1;
# Validate users.
foreach my $u (@$user) {
push(@err, [6, gettext("User \"%s\" does not exist"), $u])
if (! (($u =~ /^\d+$/ && defined(getpwuid($u))) ||
($u =~ /^\*$/) || ($u =~ /^\!\*$/) ||
($u =~ /^\!(\S+)$/ && defined(getpwnam($1))) ||
defined(getpwnam($u))));
$linelen += length($u) + 1;
}
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