view release on metacpan or search on metacpan
lib/App/RecordStream/Operation/fromps.pm view on Meta::CPAN
my $args_string = $this->options_string($options);
my $default_fields = $ENV{GENERATING_STATIC_DOC} ? <<STATIC : <<DYNAMIC;
Default fields for Linux:
__FORMAT_TEXT__
uid, gid, pid, fname, ppid, pgrp, sess, ttynum, flags, minflt, cminflt,
majflt, cmajflt, utime, stime, cutime, cstime, priority, start, size, rss,
wchan, time, ctime, state, euid, suid, fuid, egid, sgid, fgid, pctcpu,
pctmem, cmndline, exec, cwd
__FORMAT_TEXT__
Default fields for OS X:
__FORMAT_TEXT__
pid, ppid, pgrp, uid, gid, euid, egid, suid, sgid, priority, size, rss,
flags, nice, sess, time, stime, utime, start, wchan, ttydev, ttynum, pctcpu,
pctmem, state, cmndline, fname
__FORMAT_TEXT__
STATIC
Default fields:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Regather.pm view on Meta::CPAN
$SIG{PIPE} = 'ignore';
$SIG{USR1} =
sub { my $sig = @_;
$self->l->cc( pr => 'warning', fm => "%s:%s: SIG %s received, doing nothing" ), ls => [ __FILE__,__LINE__, $sig ] };
if ( $self->cf->is_set(qw(core uid)) && $self->cf->is_set(qw(core gid)) ) {
setgid ( $self->cf->get(qw(core gid_number)) ) || do { print "setgid went wrong: $!\n\n"; exit 1; };
setuid ( $self->cf->get(qw(core uid_number)) ) || do { print "setuid went wrong: $!\n\n"; exit 1; };
}
$self->l->cc( pr => 'info', fm => "%s:%s: %s v.%s is started.", ls => [ __FILE__,__LINE__, $self->progname, $VERSION ] );
}
view all matches for this distribution
view release on metacpan or search on metacpan
share/ppt/cp.pl view on Meta::CPAN
close PATH;
close TARGET;
if ($PRESERVE) ## preserve as many file attributes as possible...
{
my($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat $path;
utime $atime, $mtime, ($target);
chown $uid, $gid, ($target);
my $oldMode = (07777 & $mode); ## from man -s 2 mknod
chmod $oldMode, $target;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Repository.pm view on Meta::CPAN
$rep->import_rows("usr","usr.dat");
# root:x:0:0:root:/root:/bin/bash
$rep->import_rows("usr",
[ "username", "password", "uid", "gid", "comment", "home_directory", "shell" ],
"/etc/passwd" ,
{ field_sep => ":", });
=cut
lib/App/Repository.pm view on Meta::CPAN
$rep->export_rows("usr","usr.dat");
# root:x:0:0:root:/root:/bin/bash
$rep->export_rows("usr", "passwd.dat" ,{
field_sep => ":",
columns => [ "username", "password", "uid", "gid", "comment", "home_directory", "shell" ],
});
=cut
sub export_rows {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/ReslirpTunnel.pm view on Meta::CPAN
return 'nobody';
}
sub _get_group_name {
my $self = shift;
my $group = getgrgid($();
return $group if $group;
$self->_warn("Failed to get group name, using 'nogroup'");
return 'nogroup'
}
view all matches for this distribution
view release on metacpan or search on metacpan
bin/run-stop-run view on Meta::CPAN
use Pod::Usage;
use Proc::ProcessTable;
use Time::HiRes qw(sleep);
# NOTE: docs claim getpgrp($PID) isn't portable. Also, the POSIX module
# doesn't provide a separate interface for getpgid, though it's part of the
# standard and used internally.
use constant HAS_PORTABLE_GETPGRP =>
!! grep defined, @Config{qw( d_getpgid d_bsdgetpgrp d_getpgrp2 )};
my $filename = (File::Spec->splitpath(__FILE__))[-1];
my @option = (
'verbose|v' => \my $verbose,
'dry-run|n' => \my $dryrun,
view all matches for this distribution
view release on metacpan or search on metacpan
t/sd-hm/group.t view on Meta::CPAN
my $GOODUSER = BTDT::CurrentUser->new( email => 'onlooker@example.com' );
$GOODUSER->user_object->set_accepted_eula_version( Jifty->config->app('EULAVersion') );
# create a group
my ($gname, $gid) = ('mygroup', 0);
{
my $group = BTDT::Model::Group->new( current_user => $GOODUSER );
$group->create( name => $gname );
$gid = $group->id;
ok( $gid, "created group #". $gid );
}
my $task = BTDT::Model::Task->new( current_user => $GOODUSER );
$task->create(
summary => "Fly Man",
group => $gid,
);
{
my $task = BTDT::Model::Task->new( current_user => $GOODUSER );
$task->create(
t/sd-hm/group.t view on Meta::CPAN
diag $task->id;
}
my ( $ret, $out, $err );
my $sd_hm_url = "hm:$URL|group=$gid";
# pull
{
eval { ( $ret, $out, $err )
= run_script( 'sd',
t/sd-hm/group.t view on Meta::CPAN
);
{
my ( $ret, $out, $err ) = run_script( 'sd', [ 'push','--to', $sd_hm_url ] );
ok( $task->load_by_cols( summary => 'YATTA' ), "loaded HM task #". $task->id );
is( $task->group->id, $gid, "is in correct group" );
}
{
my ( $ret, $out, $err ) = run_script( 'sd', [ 'pull', '--from', $sd_hm_url ] );
run_output_matches_unordered(
t/sd-hm/group.t view on Meta::CPAN
{
my ($yatta_id, $yatta_uuid) = create_ticket_ok( '--summary', 'BLABLA', '--status', 'new' );
( $ret, $out, $err ) = run_script( 'sd', [ 'push','--to', $sd_hm_url ] );
ok( $task->load_by_cols( summary => 'BLABLA' ), "loaded HM task" );
is( $task->group->id, $gid, "is in correct group" );
}
view all matches for this distribution
view release on metacpan or search on metacpan
get_cvs|5.011000|5.003007|p
getcwd_sv|5.007002|5.007002|
get_db_sub|||iu
get_debug_opts|5.008001||Viu
get_deprecated_property_msg|5.031011||cVniu
getegid|5.005000||Viu
getenv|5.005000||Viu
getenv_len|5.006000||Viu
GETENV_LOCK|5.033005||Viu
GETENV_PRESERVES_OTHER_THREAD|5.033005|5.033005|Vn
GETENV_UNLOCK|5.033005||Viu
geteuid|5.005000||Viu
getgid|5.005000||Viu
getgrent|5.009000||Viu
GETGRENT_R_HAS_BUFFER|5.008000||Viu
GETGRENT_R_HAS_FPTR|5.008000||Viu
GETGRENT_R_HAS_PTR|5.008000||Viu
GETGRENT_R_PROTO|5.008000|5.008000|Vn
getgrgid|5.009000||Viu
GETGRGID_R_HAS_BUFFER|5.008000||Viu
GETGRGID_R_HAS_PTR|5.008000||Viu
GETGRGID_R_PROTO|5.008000|5.008000|Vn
getgrnam|5.009000||Viu
GETGRNAM_R_HAS_BUFFER|5.008000||Viu
KEY_format|5.003007||Viu
KEY_formline|5.003007||Viu
KEY_ge|5.003007||Viu
KEY_getc|5.003007||Viu
KEY_getgrent|5.003007||Viu
KEY_getgrgid|5.003007||Viu
KEY_getgrnam|5.003007||Viu
KEY_gethostbyaddr|5.003007||Viu
KEY_gethostbyname|5.003007||Viu
KEY_gethostent|5.003007||Viu
KEY_getlogin|5.003007||Viu
Perl_pp_ftfile|5.013009||Viu
Perl_pp_ftmtime|5.013009||Viu
Perl_pp_ftpipe|5.013009||Viu
Perl_pp_ftrexec|5.013009||Viu
Perl_pp_ftrwrite|5.013009||Viu
Perl_pp_ftsgid|5.013009||Viu
Perl_pp_ftsize|5.013009||Viu
Perl_pp_ftsock|5.013009||Viu
Perl_pp_ftsuid|5.013009||Viu
Perl_pp_ftsvtx|5.013009||Viu
Perl_pp_ftzero|5.013009||Viu
Perl_pp_getpeername|5.013009||Viu
Perl_pp_getsockname|5.013009||Viu
Perl_pp_ggrgid|5.013009||Viu
Perl_pp_ggrnam|5.013009||Viu
Perl_pp_ghbyaddr|5.013009||Viu
Perl_pp_ghbyname|5.013009||Viu
Perl_pp_gnbyaddr|5.013009||Viu
Perl_pp_gnbyname|5.013009||Viu
PerlProc_execv|5.005000||Viu
PerlProc_execvp|5.005000||Viu
PerlProc__exit|5.005000||Viu
PerlProc_exit|5.005000||Viu
PerlProc_fork|5.006000||Viu
PerlProc_getegid|5.005000||Viu
PerlProc_geteuid|5.005000||Viu
PerlProc_getgid|5.005000||Viu
PerlProc_getlogin|5.005000||Viu
PerlProc_GetOSError|5.006000||Viu
PerlProc_getpid|5.006000||Viu
PerlProc_gettimeofday|5.008000||Viu
PerlProc_getuid|5.005000||Viu
PerlProc_pclose|5.005000||Viu
PerlProc_pipe|5.005000||Viu
PerlProc_pipe_cloexec|5.027008||Viu
PerlProc_popen|5.005000||Viu
PerlProc_popen_list|5.007001||Viu
PerlProc_setgid|5.005000||Viu
PerlProc_setjmp|5.005000||Viu
PerlProc_setuid|5.005000||Viu
PerlProc_signal|5.005000||Viu
PerlProc_sleep|5.005000||Viu
PerlProc_spawnvp|5.008000||Viu
PL_defgv|5.004005|5.003007|p
PL_def_layerlist|5.007003||Viu
PL_defoutgv|5.005000||Viu
PL_defstash|5.005000||Viu
PL_delaymagic|5.005000||Viu
PL_delaymagic_egid|5.015008||Viu
PL_delaymagic_euid|5.015008||Viu
PL_delaymagic_gid|5.015008||Viu
PL_delaymagic_uid|5.015008||Viu
PL_destroyhook|5.010000||Viu
PL_diehook|5.005000|5.003007|poVnu
PL_Dir|5.006000||Viu
PL_dirty|5.005000|5.003007|poVnu
setfd_cloexec|5.027008||Vniu
setfd_cloexec_for_nonsysfd|5.027008||Viu
setfd_cloexec_or_inhexec_by_sysfdness|5.027008||Viu
setfd_inhexec|5.027008||Vniu
setfd_inhexec_for_sysfd|5.027008||Viu
setgid|5.005000||Viu
setgrent|5.009000||Viu
SETGRENT_R_HAS_FPTR|5.008000||Viu
SETGRENT_R_PROTO|5.008000|5.008000|Vn
sethostent|5.005000||Viu
SETHOSTENT_R_PROTO|5.008000|5.008000|Vn
SETPROTOENT_R_PROTO|5.008000|5.008000|Vn
setpwent|5.009000||Viu
SETPWENT_R_HAS_FPTR|5.008000||Viu
SETPWENT_R_PROTO|5.008000|5.008000|Vn
set_regex_pv|5.029004||Viu
setregid|5.003007||Viu
setreuid|5.003007||Viu
SETs|5.003007||Viu
setservent|5.005000||Viu
SETSERVENT_R_PROTO|5.008000|5.008000|Vn
setsockopt|5.005000||Viu
SvSCREAM|5.003007||Viu
SvSCREAM_off|5.003007||Viu
SvSCREAM_on|5.003007||Viu
sv_setbool|5.035004|5.035004|
sv_setbool_mg|5.035004|5.035004|
sv_setgid|5.019001||Viu
sv_sethek|5.015004||cViu
sv_setiv|5.003007|5.003007|
sv_setiv_mg|5.004005|5.003007|p
SvSETMAGIC|5.003007|5.003007|
SvSetMagicSV|5.004000|5.004000|
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/SimpleBackuper/Backup.pm view on Meta::CPAN
const my $SIZE_OF_TOP_FILES => 10;
const my $SAVE_DB_PERIOD => 60 * 60;
const my $PRINT_PROGRESS_PERIOD => 60;
sub _proc_uid_gid($$$) {
my($uid, $gid, $uids_gids) = @_;
my $last_uid_gid = @$uids_gids ? $uids_gids->unpack( $uids_gids->[-1] )->{id} : 0;
my $user_name = getpwuid($uid);
my($user) = grep { $_->{name} eq $user_name } map { $uids_gids->unpack($_) } @$uids_gids;
if(! $user) {
$user = {id => ++$last_uid_gid, name => $user_name};
$uids_gids->upsert({ id => $user->{id} }, $user );
#printf "new owner user added (unix uid %d, name %s, internal uid %d)\n", $uid, $user_name, $user->{id};
}
$uid = $user->{id};
my $group_name = getgrgid($gid);
my($group) = grep { $_->{name} eq $group_name } map { $uids_gids->unpack($_) } @$uids_gids;
if(! $group) {
$group = {id => ++$last_uid_gid, name => $group_name};
$uids_gids->upsert({ id => $group->{id} }, $group );
#printf "new owner group added (unix gid %d, name %s, internal gid %d)\n", $gid, $group_name, $group->{id};
}
$gid = $group->{id};
return $uid, $gid;
}
sub _get_block_to_delete {
my($state) = @_;
lib/App/SimpleBackuper/Backup.pm view on Meta::CPAN
name => $path_node,
versions => [ {
backup_id_min => $state->{last_backup_id},
backup_id_max => 0,
uid => 0,
gid => 0,
size => 0,
mode => 0,
mtime => 0,
block_id => 0,
symlink_to => undef,
lib/App/SimpleBackuper/Backup.pm view on Meta::CPAN
while(my($full_path, $dir2upd) = each %dirs2upd) {
print "Updating dir $full_path..." if $options->{verbose};
my $file = $files->find_by_parent_id_name($dir2upd->{parent_id}, $dir2upd->{filename});
my @stat = lstat($full_path);
if(@stat and $file->{versions}->[-1]->{backup_id_max} != $state->{last_backup_id}) {
my($uid, $gid) =_proc_uid_gid($stat[4], $stat[5], $state->{db}->{uids_gids});
if($file->{versions}->[-1]->{backup_id_max} == $state->{last_backup_id} - 1) {
$file->{versions}->[-1] = {
%{ $file->{versions}->[-1] },
backup_id_max => $state->{last_backup_id},
uid => $uid,
gid => $gid,
size => $stat[7],
mode => $stat[2],
mtime => $stat[9],
block_id => 0,
symlink_to => undef,
lib/App/SimpleBackuper/Backup.pm view on Meta::CPAN
} else {
push @{ $file->{versions} }, {
backup_id_min => $state->{last_backup_id},
backup_id_max => $state->{last_backup_id},
uid => $uid,
gid => $gid,
size => $stat[7],
mode => $stat[2],
mtime => $stat[9],
block_id => 0,
symlink_to => undef,
lib/App/SimpleBackuper/Backup.pm view on Meta::CPAN
if(! @stat) {
print ". Not exists\n" if $options->{verbose};
return;
}
else {
printf ", stat: %s:%s %o %s modified at %s", scalar getpwuid($stat[4]), scalar getgrgid($stat[5]), $stat[2], fmt_weight($stat[7]), fmt_datetime($stat[9]) if $options->{verbose};
}
my($backups, $blocks, $files, $parts, $uids_gids) = @{ $state->{db} }{qw(backups blocks files parts uids_gids)};
my($uid, $gid) = _proc_uid_gid($stat[4], $stat[5], $uids_gids);
my($file); {
my($filename) = $task->[0] =~ /([^\/]+)\/?$/;
$file = $files->find_by_parent_id_name($task->[2], $filename);
lib/App/SimpleBackuper/Backup.pm view on Meta::CPAN
my %version = (
backup_id_min => $state->{last_backup_id},
backup_id_max => $state->{last_backup_id},
uid => $uid,
gid => $gid,
size => $stat[7],
mode => $stat[2],
mtime => $stat[9],
block_id => undef,
symlink_to => undef,
lib/App/SimpleBackuper/Backup.pm view on Meta::CPAN
and (
$file->{versions}->[-1]->{backup_id_max} + 1 == $state->{last_backup_id}
or $file->{versions}->[-1]->{backup_id_max} == $state->{last_backup_id}
)
and $file->{versions}->[-1]->{uid} == $version{uid}
and $file->{versions}->[-1]->{gid} == $version{gid}
and $file->{versions}->[-1]->{size} == $version{size}
and $file->{versions}->[-1]->{mode} == $version{mode}
and $file->{versions}->[-1]->{mtime}== $version{mtime}
and (
defined $file->{versions}->[-1]->{symlink_to} == defined $version{symlink_to}
view all matches for this distribution
view release on metacpan or search on metacpan
SHA1 cc41e912dc130d9381f7d2dd789cd3ef306906a6 todo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQIcBAEBCAAGBQJOHyDzAAoJEBANW/tRZuAFp2QP+weJgQDVlr6M2YQ4P1xJxm32
R5tfeYvNL01tWdAkkmckncp9P4d15PLgidN/1W6m37fncQIzb/Wq9rzLSJVGKszQ
zdvuvDMJMLFPr4b/GBY+gEDss7KfVDgNfndWLtDoYk5ZNo2r6SNJdu2u4JNZGjdp
HutTDeqJfAZU46PT/A55nvOcKR1+aclOmhSigR9maqISUe7Rovg6jYs/VHAz1fQr
9e/pJbgS+bvzGdPlx73jPM5Z54MqwPjl/K20phbr+PcUSKXPH2GY8Y0MFmcRryRx
r2fwq2u5UuIRE0MG1WArCUlZwZDpLruoA2SemOjUl1FubRwaxB7HcqWUOSV4I4vX
CnsVPWZKgoaui5XP9xSrF8uUrCkvAbyM74lI1+jFU0QZyzBmEbIZnMb9kcE1TTAM
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Slaughter/API/freebsd.pm view on Meta::CPAN
#
# If the GCos field isn't set then define it.
#
$params{ 'Gcos' } = $params{ 'Login' } if ( !$params{ 'Gcos' } );
# name:uid:gid:class:change:expire:gecos:home_dir:shell:password
my $line =
"$params{ 'Login' }:$params{ 'UID' }:::::$params{ 'Gcos' }::/bin/sh:";
my $cmd = "echo $line | adduser -G wheel -q -w random -f -";
RunCommand( Cmd => $cmd );
view all matches for this distribution
view release on metacpan or search on metacpan
share/public/highlight/highlight.min.js view on Meta::CPAN
className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...B]
},H,J,{beginKeywords:"import",end:/$/,contains:[...v],relevance:0
},...B,..._,...M,I,P,...z,...q,U,V]}}})();hljs.registerLanguage("swift",e)})();/*! `perl` grammar compiled for Highlight.js 11.7.0 */
(()=>{var e=(()=>{"use strict";return e=>{
const n=e.regex,t=/[dualxmsipngr]{0,12}/,r={$pattern:/[\w.]+/,
keyword:"abs accept alarm and atan2 bind binmode bless break caller chdir chmod chomp chop chown chr chroot close closedir connect continue cos crypt dbmclose dbmopen defined delete die do dump each else elsif endgrent endhostent endnetent endprotoen...
},s={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:r},i={begin:/->\{/,
end:/\}/},a={variants:[{begin:/\$\d/},{
begin:n.concat(/[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")
},{begin:/[$%@][^\s\w{]/,relevance:0}]
},c=[e.BACKSLASH_ESCAPE,s,a],o=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],g=(e,r,s="\\1")=>{
view all matches for this distribution
view release on metacpan or search on metacpan
inc/File/Find/Rule.pm view on Meta::CPAN
-e => exists => -f => file =>
-z => empty => -d => directory =>
-s => nonempty => -l => symlink =>
=> -p => fifo =>
-u => setuid => -S => socket =>
-g => setgid => -b => block =>
-k => sticky => -c => character =>
=> -t => tty =>
-M => modified =>
-A => accessed => -T => ascii =>
-C => changed => -B => binary =>
inc/File/Find/Rule.pm view on Meta::CPAN
#line 248
use vars qw( @stat_tests );
@stat_tests = qw( dev ino mode nlink uid gid rdev
size atime mtime ctime blksize blocks );
{
my $i = 0;
for my $test (@stat_tests) {
my $index = $i++; # to close over
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/SpeedTest.pm view on Meta::CPAN
1: 10661 - Tengir hf Akureyri 1980.02 km
2: 21605 - Premis ehf ReykjavÃk 2039.16 km
3: 3684 - Nova Reykjavik 2039.16 km
4: 6471 - Gagnaveita Reykjavikur Reykjavik 2039.16 km
5: 10650 - Nova VIP Reykjavik 2039.16 km
6: 16148 - Hringidan Reykjavik 2039.16 km
7: 4818 - Siminn Reykjavik 2039.16 km
8: 17455 - Hringdu ReykjavÃk 2039.16 km
9: 4141 - Vodafone ReykjavÃk 2039.16 km
10: 3644 - Snerpa Isafjordur 2192.27 km
view all matches for this distribution
view release on metacpan or search on metacpan
strings used by spread-revolutionary-date (but not translations of
days, months, feasts used in the French Revolutionary Calendar, see
below). They can copy this template to a portable object file of their
language and translate strings of this file. For example, a German
translator would work on po/de.po. All strings to be translated are
laid down in lines beginning with msgid keyword, and translations
should go on the next line beginning with keyword msgstr. E.g.:
msgid "Please, enter message to spread"
A German translator would have to replace the next line:
msgstr ""
When the string to be translated includes some words in curly braces,
these words are actually named variables and should be left as is in
the translation. E.g.:
msgid "or {abort} to abort"
msgstr "oder {abort}, um abzubrechen"
And that's it! As of version 0.11 of spread-revolutionary-date, there
is only about a dozen of strings to translate, mainly for PromptUser
message maker. But with the possibility to extend to other message
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Standby/DB.pm view on Meta::CPAN
CREATE TABLE IF NOT EXISTS config (
id INTEGER PRIMARY KEY ASC,
key TEXT,
value TEXT,
group_id INTEGER,
CONSTRAINT fk_gid FOREIGN KEY (group_id) REFERENCES groups (id) ON DELETE CASCADE
);
EOS
if($dbh->do($sql_config)) {
#$self->logger()->log( message => 'Table config OK', level => 'debug', );
} else {
lib/App/Standby/DB.pm view on Meta::CPAN
id INTEGER PRIMARY KEY ASC,
group_id INTEGER,
name TEXT,
desc TEXT,
class TEXT,
CONSTRAINT fk_gid FOREIGN KEY (group_id) REFERENCES groups (id) ON DELETE CASCADE,
CONSTRAINT uq_name UNIQUE (group_id,name)
);
EOS
if($dbh->do($sql_group_services)) {
lib/App/Standby/DB.pm view on Meta::CPAN
name TEXT,
cellphone TEXT,
group_id INTEGER,
is_enabled INTEGER,
ordinal INTEGER,
CONSTRAINT fk_gid FOREIGN KEY (group_id) REFERENCES groups (id) ON DELETE CASCADE
);
EOS
if($dbh->do($sql_ctcs)) {
#$self->logger()->log( message => 'Table contacts OK', level => 'debug', );
lib/App/Standby/DB.pm view on Meta::CPAN
name TEXT,
cellphone TEXT,
group_id INTEGER,
is_enabled INTEGER,
ordinal INTEGER,
CONSTRAINT fk_gid FOREIGN KEY (group_id) REFERENCES groups (id) ON DELETE CASCADE
);
INSERT INTO contacts SELECT id,name,cellphone,group_id,is_enabled,ordinal FROM contacts_backup;
DROP TABLE contacts_backup;
COMMIT;
EOS
view all matches for this distribution
view release on metacpan or search on metacpan
preconfigure() {
for sym in \
d_getgrnam_r d_endgrent d_endgrent_r d_endhent \
d_endhostent_r d_endnent d_endnetent_r d_endpent \
d_endprotoent_r d_endpwent d_endpwent_r d_endsent \
d_endservent_r d_getgrent d_getgrent_r d_getgrgid_r \
d_getgrnam_r d_gethbyaddr d_gethent d_getsbyport \
d_gethostbyaddr_r d_gethostbyname_r d_gethostent_r \
d_getlogin_r d_getnbyaddr d_getnbyname d_getnent \
d_getnetbyaddr_r d_getnetbyname_r d_getnetent_r \
d_getpent d_getpbyname d_getpbynumber d_getprotobyname_r \
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Sv.pm view on Meta::CPAN
return;
}
if ($pid == 0) {
# child
# set egid/euid
if ($svc->{group}) {
$svc->{gid} = getgrnam($svc->{group});
$) = $svc->{gid};
}
if ($svc->{user}) {
$svc->{uid} = getpwnam($svc->{user});
$> = $svc->{uid};
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Sysadmin/Log/Simple/File.pm view on Meta::CPAN
my $user = $ENV{SUDO_USER} || $ENV{USER}; # We need to know who wrote this
say $logfh " $timestamp $user:\t$line";
# This might be run as root, so fix up ownership and
# permissions so mortals can log to files root started
my ($uid, $gid) = (getpwnam($self->{user}))[2,3];
chown $uid, $gid, $logfile;
chmod 0644, $logfile;
return "Logged to $logfile";
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/TLSMe.pm view on Meta::CPAN
eval { require Privileges::Drop; 1 }
or do { die "Privileges::Drop is required\n" };
if ($self->{group}) {
Privileges::Drop::drop_uidgid($self->{user}, $self->{group});
}
else {
Privileges::Drop::drop_privileges($self->{user});
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/input/bsd_tar_1 view on Meta::CPAN
crw-r--r-- 0 root admin 0,0 Jan 14 09:10 test_tar_archive/char_device
drwxr-xr-x 2 marca admin 0 Jan 14 08:57 test_tar_archive/directory/
-rwxr-xr-x 1 marca CHEGG\domain users 0 Jan 14 08:59 test_tar_archive/executable
prw-r--r-- 1 marca admin 0 Jan 14 09:01 test_tar_archive/fifo
-rw-r--r-- 1 marca CHEGG\domain users 0 Jan 14 08:57 test_tar_archive/normal_file
-rw-r-Sr-- 1 marca admin 0 Jan 14 09:48 test_tar_archive/setgid_file
-rwSr--r-- 1 marca admin 0 Jan 14 09:47 test_tar_archive/setuid_file
-rw-r--r-T 1 marca admin 0 Jan 14 09:17 test_tar_archive/sticky_file
lrwxr-xr-x 1 marca admin 0 Jan 15 08:33 test_tar_archive/symlink -> normal_file
view all matches for this distribution
view release on metacpan or search on metacpan
local/lib/perl5/File/Remove.pm view on Meta::CPAN
if ( -f $path ) {
print "file: $path\n" if DEBUG;
unless ( -w $path ) {
# Make the file writable (implementation from File::Path)
(undef, undef, my $rp) = lstat $path or next;
$rp &= 07777; # Don't forget setuid, setgid, sticky bits
$rp |= 0600; # Turn on user read/write
chmod $rp, $path;
}
if ( $unlink ? $unlink->($path) : unlink($path) ) {
# Failed to delete the file
view all matches for this distribution
view release on metacpan or search on metacpan
* Plugins which present variables for use in your template(s).
* Creating variables that refer to file contents, file globs, etc.
* Plugins which filter content of your template(s).
* Simplify the way template can be written (escaping `HTML::Template` syntax which is too rigid for some text-editors facility, namely `nxml-mode` in Emacs for instance).
Although similar there is a different API for the three plugin-families.
### Formatter Plugins
### Filter Plugins
The template filter plugin is similar in use as the formatter one. The only
difference is at the level it operates. While a formatter plugin operates on
the content of the page, a filter one operates directly on the core template
engine allowing one to escape `HTML::Template` rigid syntax.
A standard input page-file might look like this:
Title: My page title.
template-filter: dollar
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Test/Generator.pm view on Meta::CPAN
close closedir connect cos crypt
dbmclose dbmopen defined delete die do dump
each endgrent endhostent endnetent endprotoent endpwent endservent
eof eval exec exists exit exp
fcntl fileno flock fork format formline
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
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Transpierce.pm view on Meta::CPAN
=back
Both C<restore.sh> and C<deploy.sh> scripts copy each file back into their
original locations from the corresponding directory, then change their mode,
uid and gid back to what it was during the initialization. You might
B<require root permissions> to run those scripts, depending on files'
original locations and permissions.
C<diff.sh> script can be run to make sure file contents in C<restore> directory
do not differ from original files. It is recommended to do that before running
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/UnixUIDUtils.pm view on Meta::CPAN
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2022-07-24'; # DATE
our $DIST = 'App-UnixUIDUtils'; # DIST
our $VERSION = '0.002'; # VERSION
$SPEC{gid_to_groupname} = {
v => 1.1,
args => {
group => {
schema => 'unix::groupname::exists*',
req => 1,
pos => 0,
},
},
};
sub gid_to_groupname {
my %args = @_;
# this function actually just utilizes the coercion rule
[200, "OK", $args{group}];
}
lib/App/UnixUIDUtils.pm view on Meta::CPAN
# this function actually just utilizes the coercion rule
[200, "OK", $args{user}];
}
$SPEC{groupname_to_gid} = {
v => 1.1,
args => {
group => {
schema => 'unix::gid::exists*',
req => 1,
pos => 0,
},
},
};
sub groupname_to_gid {
my %args = @_;
# this function actually just utilizes the coercion rule
[200, "OK", $args{group}];
}
lib/App/UnixUIDUtils.pm view on Meta::CPAN
This distributions provides the following command-line utilities:
=over
=item * L<gid-to-groupname>
=item * L<groupname-to-gid>
=item * L<uid-to-username>
=item * L<username-to-uid>
=back
=head1 FUNCTIONS
=head2 gid_to_groupname
Usage:
gid_to_groupname(%args) -> [$status_code, $reason, $payload, \%result_meta]
This function is not exported.
Arguments ('*' denotes required arguments):
lib/App/UnixUIDUtils.pm view on Meta::CPAN
Return value: (any)
=head2 groupname_to_gid
Usage:
groupname_to_gid(%args) -> [$status_code, $reason, $payload, \%result_meta]
This function is not exported.
Arguments ('*' denotes required arguments):
=over 4
=item * B<group>* => I<unix::gid::exists>
=back
Returns an enveloped result (an array).
view all matches for this distribution
view release on metacpan or search on metacpan
script/upf-add-user-to-group
script/upf-delete-group
script/upf-delete-user
script/upf-delete-user-from-group
script/upf-get-group
script/upf-get-max-gid
script/upf-get-max-uid
script/upf-get-user
script/upf-get-user-groups
script/upf-group-exists
script/upf-is-member
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/WRT/Date.pm view on Meta::CPAN
sub get_mtime {
my (@filenames) = @_;
my @mtimes;
for my $filename (@filenames) {
#my( $dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size,
# $atime, $mtime, $ctime, $blksize, $blocks )
# = stat( $filename );
push @mtimes, (stat $filename)[9];
}
view all matches for this distribution