view release on metacpan or search on metacpan
IT/perlfunc.pod view on Meta::CPAN
non l'operatore virgola che costruisce una lista.
CiE<ograve> significa che quella non era una lista nemmeno in partenza.
In generale, le funzioni Perl che fungono da wrapper [involucro, interfaccia
tra un programma ed un altro, NdT] per le chiamate di sistema che hanno lo
stesso nome (come chown(2), fork(2), closedir(2), ecc.) restituiscono tutte
vero quando hanno successo e C<undef> in caso contrario, come viene solitamente
menzionato nelle descrizioni che seguono. CiE<ograve> differisce dall'interfaccia
C, che restituisce C<-1> in caso di fallimento. Le eccezioni a questa regola sono
C<wait>, C<waitpid> e C<syscall>. Le chiamate di sistema inoltre impostano la variabile
speciale C<$!> in caso di fallimento. Altre funzioni non lo fanno,
IT/perlfunc.pod view on Meta::CPAN
C<pack>, C<read>, C<syscall>, C<sysread>, C<syswrite>, C<unpack>, C<vec>
=item Funzioni per filehandle, file o directory
X<file> X<filehandle> X<directory> X<pipe> X<link> X<symlink>
C<-I<X>>, C<chdir>, C<chmod>, C<chown>, C<chroot>, C<fcntl>, C<glob>,
C<ioctl>, C<link>, C<lstat>, C<mkdir>, C<open>, C<opendir>,
C<readlink>, C<rename>, C<rmdir>, C<stat>, C<symlink>, C<sysopen>,
C<umask>, C<unlink>, C<utime>
=item Parole chiave relative al controllo di flusso del vostro programma Perl
IT/perlfunc.pod view on Meta::CPAN
chiamate di sistema Unix. In ambienti non-Unix, le funzionalitE<agrave> di
alcune di queste chiamate potrebbe non essere disponibile, oppure i dettagli
potrebbero essere un po' diversi. Le funzioni Perl influenzate da questo aspetto
sono:
C<-X>, C<binmode>, C<chmod>, C<chown>, C<chroot>, C<crypt>,
C<dbmclose>, C<dbmopen>, C<dump>, C<endgrent>, C<endhostent>,
C<endnetent>, C<endprotoent>, C<endpwent>, C<endservent>, C<exec>,
C<fcntl>, C<flock>, C<fork>, C<getgrent>, C<getgrgid>, C<gethostbyname>,
C<gethostent>, C<getlogin>, C<getnetbyaddr>, C<getnetbyname>, C<getnetent>,
C<getppid>, C<getpgrp>, C<getpriority>, C<getprotobynumber>,
IT/perlfunc.pod view on Meta::CPAN
Va notato che C<chop> restituisce l'ultimo carattere. Per ottenere tutto
tranne l'ultimo carattere, utilizzate C<substr($stringa, 0, -1)>.
Si veda anche L</chomp>.
=item chown LISTA
X<chown> X<owner> X<user> X<group>
Cambia il proprietario (ed il gruppo) di una lista di file. I primi due elementi della lista
devono essere uid e gid I<numerici>, nell'ordine indicato. Un valore di -1 in una di queste due
posizioni viene interpretato dalla maggior parte dei sistemi operativi come volontE<agrave>
di non alterare tale valore. Restituisce il numero di file modificati con successo.
$cnt = chown $uid, $gid, 'pippo', 'pluto';
chown $uid, $gid, @nomifile;
Su sistemi che supportano fchown, potreste passare i file handle tra i file.
Su sistemi che non supportano fchmod, passare file handle
produce un errore fatale a tempo di esecuzione.
Di seguito E<egrave> riportato un esempio che risolve le uid non numeriche servendosi del file
passwd:
IT/perlfunc.pod view on Meta::CPAN
($login,$pass,$uid,$gid) = getpwnam($utente)
or die "$utente non e` presente nel file passwd";
@ary = glob($pattern); # espande i nomi dei file
chown $uid, $gid, @ary;
Sulla maggior parte dei sistemi, non E<egrave> consentito cambiare il proprietario dei file a
meno che non si sia superuser. Dovreste tuttavia essere in grado di cambiare il gruppo
impostandolo ad uno qualsiasi dei vostri gruppi secondari. Su sistemi non sicuri, queste
restrizioni potrebbero essere meno rigide, ma assumere una cosa del genere non E<egrave>
portabile. Sui sistemi POSIX, potete verificare questa condizione in questo modo:
use POSIX qw(sysconf _PC_CHOWN_RESTRICTED);
$chown_possibile = not sysconf(_PC_CHOWN_RESTRICTED);
=item chr NUMERO
X<chr> X<carattere> X<ASCII> X<Unicode>
=item chr
view all matches for this distribution
view release on metacpan or search on metacpan
lib/POD2/RU/perlfunc.pod view on Meta::CPAN
the context at compile time. It would generate the scalar comma operator
there, not the list construction version of the comma. That means it
was never a list to start with.
In general, functions in Perl that serve as wrappers for system calls ("syscalls")
of the same name (like chown(2), fork(2), closedir(2), etc.) return
true when they succeed and C<undef> otherwise, as is usually mentioned
in the descriptions below. This is different from the C interfaces,
which return C<-1> on failure. Exceptions to this rule include C<wait>,
C<waitpid>, and C<syscall>. System calls also set the special C<$!>
variable on failure. Other functions do not, except accidentally.
lib/POD2/RU/perlfunc.pod view on Meta::CPAN
=item Functions for filehandles, files, or directories
X<file> X<filehandle> X<directory> X<pipe> X<link> X<symlink>
=for Pod::Functions =File
C<-I<X>>, C<chdir>, C<chmod>, C<chown>, C<chroot>, C<fcntl>, C<glob>,
C<ioctl>, C<link>, C<lstat>, C<mkdir>, C<open>, C<opendir>,
C<readlink>, C<rename>, C<rmdir>, C<stat>, C<symlink>, C<sysopen>,
C<umask>, C<unlink>, C<utime>
=item Keywords related to the control flow of your Perl program
lib/POD2/RU/perlfunc.pod view on Meta::CPAN
system calls. In non-Unix environments, the functionality of some
Unix system calls may not be available or details of the available
functionality may differ slightly. The Perl functions affected
by this are:
C<-X>, C<binmode>, C<chmod>, C<chown>, C<chroot>, C<crypt>,
C<dbmclose>, C<dbmopen>, C<dump>, C<endgrent>, C<endhostent>,
C<endnetent>, C<endprotoent>, C<endpwent>, C<endservent>, C<exec>,
C<fcntl>, C<flock>, C<fork>, C<getgrent>, C<getgrgid>, C<gethostbyname>,
C<gethostent>, C<getlogin>, C<getnetbyaddr>, C<getnetbyname>, C<getnetent>,
C<getppid>, C<getpgrp>, C<getpriority>, C<getprotobynumber>,
lib/POD2/RU/perlfunc.pod view on Meta::CPAN
Note that C<chop> returns the last character. To return all but the last
character, use C<substr($string, 0, -1)>.
See also L</chomp>.
=item chown LIST
X<chown> X<owner> X<user> X<group>
=for Pod::Functions change the ownership on a list of files
Changes the owner (and group) of a list of files. The first two
elements of the list must be the I<numeric> uid and gid, in that
order. A value of -1 in either position is interpreted by most
systems to leave that value unchanged. Returns the number of files
successfully changed.
$cnt = chown $uid, $gid, 'foo', 'bar';
chown $uid, $gid, @filenames;
On systems that support fchown(2), you may pass filehandles among the
files. On systems that don't support fchown(2), passing filehandles raises
an exception. Filehandles must be passed as globs or glob references to be
recognized; barewords are considered filenames.
Here's an example that looks up nonnumeric uids in the passwd file:
lib/POD2/RU/perlfunc.pod view on Meta::CPAN
($login,$pass,$uid,$gid) = getpwnam($user)
or die "$user not in passwd file";
@ary = glob($pattern); # expand filenames
chown $uid, $gid, @ary;
On most systems, you are not allowed to change the ownership of the
file unless you're the superuser, although you should be able to change
the group to any of your secondary groups. On insecure systems, these
restrictions may be relaxed, but this is not a portable assumption.
On POSIX systems, you can detect this condition this way:
use POSIX qw(sysconf _PC_CHOWN_RESTRICTED);
$can_chown_giveaway = not sysconf(_PC_CHOWN_RESTRICTED);
Portability issues: L<perlport/chmod>.
=item chr NUMBER
X<chr> X<character> X<ASCII> X<Unicode>
view all matches for this distribution
view release on metacpan or search on metacpan
examples/fuse.pl view on Meta::CPAN
}
return;
}
sub fuse_chown : State {
my( $postback, $context, $path, $uid, $gid ) = @_[ ARG0 .. ARG4 ];
#print "CHOWN: '$path' - '$uid' - '$gid'\n";
if ( exists $files{ $path } ) {
# okay, update the ownerships!!
view all matches for this distribution
view release on metacpan or search on metacpan
Debian_CPANTS.txt view on Meta::CPAN
"libjson-any-perl", "JSON-Any", "1.19", "0", "0"
"libjson-perl", "JSON", "2.14", "0", "0"
"libjson-xs-perl", "JSON-XS", "2.232", "0", "0"
"libkwiki-cache-perl", "Kwiki-Cache", "0.11", "0", "0"
"libkwiki-perl", "Kwiki", "0.39", "0", "0"
"liblchown-perl", "Lchown", "1.00", "0", "0"
"liblexical-persistence-perl", "Lexical-Persistence", "0.98", "0", "0"
"liblingua-en-inflect-perl", "Lingua-EN-Inflect", "1.89", "0", "0"
"liblingua-en-nameparse-perl", "Lingua-EN-NameParse", "1.24", "0", "0"
"liblingua-en-numbers-ordinate-perl", "Lingua-EN-Numbers-Ordinate", "1.02", "0", "0"
"liblingua-es-numeros-perl", "Lingua-ES-Numeros", "0.05", "0", "0"
view all matches for this distribution
view release on metacpan or search on metacpan
lib/POE/Devel/ProcAlike.pm view on Meta::CPAN
that would be valid across multiple invocations. If we allowed module authors to register any name, then we would
end up with possible collisions and wacky schemes like "$pkg$ses->ID" as the name...
Also, here's a tip: you don't have to implement the entire L<Filesys::Virtual::Async> API because FUSE doesn't use
them all! The ones you would have to do is: rmtree, scandir, move, copy, load, readdir, rmdir, mkdir, rename, mknod,
unlink, chmod, truncate, chown, utime, stat, write, open. To save even more time, you can subclass the
L<Filesys::Virtual::Async::inMemory> module and set readonly to true. Then you would have to subclass only those
methods: readdir, stat, open.
=head2 TODO
view all matches for this distribution
view release on metacpan or search on metacpan
lib/POSIX/1003/FS.pm view on Meta::CPAN
# POSIX.xs defines L_ctermid L_cuserid L_tmpname: useless!
my @functions = qw/
mkfifo mknod stat lstat rename
access lchown
utime
major minor makedev
/;
our @IN_CORE = qw(utime mkdir stat lstat rename);
lib/POSIX/1003/FS.pm view on Meta::CPAN
my %access_subset;
@access_subset{@access} = @{$fsys}{@access};
tie %access, 'POSIX::1003::ReadOnlyTable', \%access_subset;
# initialize the :stat export tag
@stat = qw/stat lstat mkfifo mknod mkdir lchown
S_ISDIR S_ISCHR S_ISBLK S_ISREG S_ISFIFO S_ISLNK S_ISSOCK S_ISWHT
/;
push @stat, grep /^S_I/, keys %$fsys;
my %stat_subset;
@stat_subset{@stat} = @{$fsys}{@stat};
lib/POSIX/1003/FS.pm view on Meta::CPAN
sub S_ISLNK($) { ($_[0] & S_IFMT()) == S_IFLNK()}
sub S_ISSOCK($) { ($_[0] & S_IFMT()) == S_IFSOCK()}
sub S_ISWHT($) { ($_[0] & S_IFMT()) == S_IFWHT()} # FreeBSD
sub lchown($$@)
{ my ($uid, $gid) = (shift, shift);
my $successes = 0;
POSIX::lchown($uid, $gid, $_) && $successes++ for @_;
$successes;
}
sub posix_glob($%)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/POSIX/2008.pm view on Meta::CPAN
our @_functions = qw(
a64l abort abs access acos acosh alarm asin asinh atan atan2 atanh atof atoi
basename cabs cacos cacosh carg casin casinh catan catanh catclose catgets
catopen cbrt ccos ccosh ceil cexp chdir chmod chown cimag clock
clock_getcpuclockid clock_getres clock_gettime clock_nanosleep clock_settime
clog close confstr conj copysign cos cosh cpow cproj creal creat csin csinh
csqrt ctan ctanh dirname div dlclose dlerror dlopen dlsym drand48 endutxent
erand48 erf erfc execveat exp exp2 expm1 faccessat fchmodat fchownat fdatasync
fdim fdopen fdopendir feclearexcept fegetround feraiseexcept fesetround
fetestexcept fexecve ffs floor fma fmax fmin fmod fnmatch fpclassify fstatat
fsync futimens getdate getdate_err getegid geteuid getgid gethostid
gethostname getitimer getpriority getsid getuid getutxent getutxid getutxline
hypot ilogb isalnum isalpha isascii isatty isblank iscntrl isdigit isfinite
isgraph isgreaterequal isinf isless islessequal islessgreater islower isnan
isnormal isprint ispunct isspace isunordered isupper isxdigit j0 j1 jn jrand48
killpg l64a lchown ldexp lgamma link linkat log log10 log1p log2 logb lrand48
lround lstat mkdir mkdirat mkdtemp mkfifo mkfifoat mknod mknodat mkstemp
mrand48 nanosleep nearbyint nextafter nexttoward nice nrand48 open openat
openat2 pathconf poll posix_fadvise posix_fallocate pread preadv preadv2
psignal ptsname pwrite pwritev pwritev2 random raise read readlink readlinkat
readv realpath remainder remove removeat remquo rename renameat renameat2
lib/POSIX/2008.pm view on Meta::CPAN
atoll => 'atoi',
ldiv => 'div',
lldiv => 'div',
fchdir => 'chdir',
fchmod => 'chmod',
fchown => 'chown',
ftruncate => 'truncate',
);
my %deprecated_warned;
push @EXPORT_OK, keys %deprecated;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/POSIX/RT/SharedMem.pm view on Meta::CPAN
Extra flags that are used when opening the shared memory object (e.g. C<O_EXCL>).
=back
It returns a filehandle that can be used to with L<stat>, L<chmod>, L<chown>. For portability you should not assume you can read or write directly from it.
=head2 shared_unlink $name
Remove the shared memory object $name from the namespace. Note that while the shared memory object can't be opened anymore after this, it doesn't remove the contents until all processes have closed it.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/POSIX/RT/ppport.h view on Meta::CPAN
KEY_chdir|5.003007||Viu
KEY_CHECK|5.006000||Viu
KEY_chmod|5.003007||Viu
KEY_chomp|5.003007||Viu
KEY_chop|5.003007||Viu
KEY_chown|5.003007||Viu
KEY_chr|5.003007||Viu
KEY_chroot|5.003007||Viu
KEY_close|5.003007||Viu
KEY_closedir|5.003007||Viu
KEY_cmp|5.003007||Viu
lib/POSIX/RT/ppport.h view on Meta::CPAN
PERL_LANGINFO_H|5.027004||Viu
PERL_LAST_5_18_0_INTERP_MEMBER|5.017009||Viu
Perl_ldexp|5.021003|5.021003|n
PerlLIO_access|5.005000||Viu
PerlLIO_chmod|5.005000||Viu
PerlLIO_chown|5.005000||Viu
PerlLIO_chsize|5.005000||Viu
PerlLIO_close|5.005000||Viu
PerlLIO_dup2|5.005000||Viu
PerlLIO_dup2_cloexec|5.027008||Viu
PerlLIO_dup|5.005000||Viu
view all matches for this distribution
view release on metacpan or search on metacpan
lib/POSIX/RT/ppport.h view on Meta::CPAN
KEY_chdir|5.003007||Viu
KEY_CHECK|5.006000||Viu
KEY_chmod|5.003007||Viu
KEY_chomp|5.003007||Viu
KEY_chop|5.003007||Viu
KEY_chown|5.003007||Viu
KEY_chr|5.003007||Viu
KEY_chroot|5.003007||Viu
KEY_close|5.003007||Viu
KEY_closedir|5.003007||Viu
KEY_cmp|5.003007||Viu
lib/POSIX/RT/ppport.h view on Meta::CPAN
PERL_LANGINFO_H|5.027004||Viu
PERL_LAST_5_18_0_INTERP_MEMBER|5.017009||Viu
Perl_ldexp|5.021003|5.021003|n
PerlLIO_access|5.005000||Viu
PerlLIO_chmod|5.005000||Viu
PerlLIO_chown|5.005000||Viu
PerlLIO_chsize|5.005000||Viu
PerlLIO_close|5.005000||Viu
PerlLIO_dup2|5.005000||Viu
PerlLIO_dup2_cloexec|5.027008||Viu
PerlLIO_dup|5.005000||Viu
view all matches for this distribution
view release on metacpan or search on metacpan
21783 ioctl(8, TCGETS, 0x7ffffff2aa40) = -1 ENOTTY (Inappropriate ioctl for device)
21783 lseek(8, 0, SEEK_CUR) = 0
21783 read(8, "# This file was created by configpm when Perl was built. Any changes\n# made to this file will be lost the next time perl is built.\n\npackage Config;\nuse strict;\nuse warnings;\nour %Config;\n\nsub bincompat_options {\n return spl...
21783 brk(0x227b000) = 0x227b000
21783 read(8, "LIGNMENT__=16 __BYTE_ORDER__=1234 __CHAR16_TYPE__=short\\ unsigned\\ int __CHAR32_TYPE__=unsigned\\ int __CHAR_BIT__=8 __DBL_DECIMAL_DIG__=17 __DBL_DENORM_MIN__=((double)4.94065645841246544177e-324L) __DBL_DIG__=15 __DBL_EPSILON__=((do...
21783 read(8, "='define'\nd_difftime64='undef'\nd_dir_dd_fd='undef'\nd_dirfd='define'\nd_dirnamlen='undef'\nd_dladdr='define'\nd_dlerror='define'\nd_dlopen='define'\nd_dlsymun='undef'\nd_dosuid='undef'\nd_double_has_inf='define'\nd_double_has_nan='de...
21783 read(8, "klen_t='define'\nd_sockpair='define'\nd_socks5_init='undef'\nd_sqrtl='define'\nd_srand48_r='define'\nd_srandom_r='define'\nd_sresgproto='define'\nd_sresuproto='define'\nd_stat='define'\nd_statblks='define'\nd_statfs_f_flags='define'\nd...
21783 read(8, "\ni_vfork='undef'\ni_wchar='define'\ni_wctype='define'\ni_xlocale='define'\nignore_versioned_solibs='y'\ninc_version_list=' '\ninc_version_list_init='0'\nincpath=''\nincpth='/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/include /usr/loca...
21783 read(8, "lse'\nsGMTIME_max='67768036191676799'\nsGMTIME_min='-62167219200'\nsLOCALTIME_max='67768036191676799'\nsLOCALTIME_min='-62167219200'\nsPRIEUldbl='\"LE\"'\nsPRIFUldbl='\"LF\"'\nsPRIGUldbl='\"LG\"'\nsPRIXU64='\"lX\"'\nsPRId64='\"ld\"'\ns...
21783 read(8, "ne ending for print\n\n\t# all config-vars are by definition \\w only, any \\W means regex\n\tif ($qry =~ /\\W/) {\n\t my @matches = config_re($qry);\n\t print map \"$_$lnend\", @matches ? @matches : \"$qry: not found\"\t\tif !$n...
21783 brk(0x229d000) = 0x229d000
view all matches for this distribution
view release on metacpan or search on metacpan
lib/PPI/Singletons.pm view on Meta::CPAN
);
# List of keywords is from regen/keywords.pl in the perl source.
our %KEYWORDS = map { $_ => 1 } qw{
abs accept alarm and atan2 bind binmode bless break caller chdir chmod
chomp chop chown chr chroot close closedir cmp connect continue cos
crypt dbmclose dbmopen default defined delete die do dump each else
elsif endgrent endhostent endnetent endprotoent endpwent endservent
eof eq eval evalbytes exec exists exit exp fc fcntl fileno flock for
foreach fork format formline ge getc getgrent getgrgid getgrnam
gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr
view all matches for this distribution
view release on metacpan or search on metacpan
lib/PPIx/Utils/Classification.pm view on Meta::CPAN
# egrep '=item.*LIST' perlfunc.pod
my %BUILTINS_WHICH_PROVIDE_LIST_CONTEXT =
map { $_ => 1 }
qw{
chmod
chown
die
exec
formline
grep
import
view all matches for this distribution
view release on metacpan or search on metacpan
bin/gen_builtin_expr.pl view on Meta::CPAN
'caller',
'chdir',
'chmod',
'chomp',
'chop',
'chown',
'chr',
'chroot',
'close',
'closedir',
'connect',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Package/Builder.pm view on Meta::CPAN
#change uid if necessary
$uid = getUserId($uid);
$gid = getGroupId($gid);
find(
sub {
chown $uid, $gid, $_;
},
$tmp_dir
);
}
chdir $cwdir;
view all matches for this distribution
view release on metacpan or search on metacpan
KEY_chdir|5.003007||Viu
KEY_CHECK|5.006000||Viu
KEY_chmod|5.003007||Viu
KEY_chomp|5.003007||Viu
KEY_chop|5.003007||Viu
KEY_chown|5.003007||Viu
KEY_chr|5.003007||Viu
KEY_chroot|5.003007||Viu
KEY_close|5.003007||Viu
KEY_closedir|5.003007||Viu
KEY_cmp|5.003007||Viu
PERL_LANGINFO_H|5.027004||Viu
PERL_LAST_5_18_0_INTERP_MEMBER|5.017009||Viu
Perl_ldexp|5.021003|5.021003|n
PerlLIO_access|5.005000||Viu
PerlLIO_chmod|5.005000||Viu
PerlLIO_chown|5.005000||Viu
PerlLIO_chsize|5.005000||Viu
PerlLIO_close|5.005000||Viu
PerlLIO_dup2|5.005000||Viu
PerlLIO_dup2_cloexec|5.027008||Viu
PerlLIO_dup|5.005000||Viu
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Padre/Wx/Scintilla.pm view on Meta::CPAN
# Perl Keywords
q{
NULL __FILE__ __LINE__ __PACKAGE__ __DATA__ __END__ AUTOLOAD
BEGIN CORE DESTROY END EQ GE GT INIT LE LT NE CHECK abs accept
alarm and atan2 bind binmode bless caller chdir chmod chomp chop
chown chr chroot close closedir cmp connect continue cos crypt
dbmclose dbmopen defined delete die do dump each else elsif endgrent
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
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Pantry/App/Command/sync.pm view on Meta::CPAN
# ensure destination directory and ownership
my $dest_dir = $self->_remote_pantry_dir;
$ssh->system($sudo . "mkdir -p $dest_dir")
or die "Could not create $dest_dir\n";
if ( $sudo ) {
$ssh->system($sudo . "chown $user $dest_dir")
or die "Could not chown $dest_dir to $user\n";
}
# generate local solo.rb and rsync it to /etc/chef/solo.rb
my ($fh, $solo_rb) = tempfile( "pantry-solo.rb-XXXXXX", TMPDIR => 1 );
print {$fh} $self->_solo_rb_guts;
lib/Pantry/App/Command/sync.pm view on Meta::CPAN
my $command = $sudo_i . "chef-solo -c $dest_dir/solo.rb";
$command .= " -l debug" if $ENV{PANTRY_CHEF_DEBUG};
$ssh->system({tty => $sudo ? 1 : 0}, $command) # XXX eventually capture output
or die "Error running chef-solo\n";
# cleanup report permissions if running under sudo so we can find/download it
$ssh->system($sudo . "chown -R $user $dest_dir/reports") if $sudo;
# scp get run report
my $report = $ssh->capture("ls -t $dest_dir/reports | head -1");
chomp $report;
# XXX should check that the report timestamp makes sense -- xdg, 2012-05-03
view all matches for this distribution
view release on metacpan or search on metacpan
inc/File/Temp.pm view on Meta::CPAN
unless (-d $parent) {
${$options{ErrStr}} = "Parent directory ($parent) is not a directory";
return ();
}
# Check the stickiness of the directory and chown giveaway if required
# If the directory is world writable the sticky bit
# must be set
if (File::Temp->safe_level == MEDIUM) {
my $safeerr;
inc/File/Temp.pm view on Meta::CPAN
return 1;
}
# Internal routine to check whether a directory is safe
# for temp files. Safer than _is_safe since it checks for
# the possibility of chown giveaway and if that is a possibility
# checks each directory in the path to see if it is safe (with _is_safe)
# If _PC_CHOWN_RESTRICTED is not set, does the full test of each
# directory anyway.
inc/File/Temp.pm view on Meta::CPAN
my $err_ref = shift;
# Should Get the value of _PC_CHOWN_RESTRICTED if it is defined
# and If it is not there do the extensive test
local($@);
my $chown_restricted;
$chown_restricted = &POSIX::_PC_CHOWN_RESTRICTED()
if eval { &POSIX::_PC_CHOWN_RESTRICTED(); 1};
# If chown_resticted is set to some value we should test it
if (defined $chown_restricted) {
# Return if the current directory is safe
return _is_safe($path,$err_ref) if POSIX::sysconf( $chown_restricted );
}
# To reach this point either, the _PC_CHOWN_RESTRICTED symbol
# was not available or the symbol was there but chown giveaway
# is allowed. Either way, we now have to test the entire tree for
# safety.
# Convert path to an absolute directory if required
unless (File::Spec->file_name_is_absolute($path)) {
inc/File/Temp.pm view on Meta::CPAN
#pod for sticky bit.
#pod
#pod =item HIGH
#pod
#pod In addition to the MEDIUM security checks, also check for the
#pod possibility of ``chown() giveaway'' using the L<POSIX|POSIX>
#pod sysconf() function. If this is a possibility, each directory in the
#pod path is checked in turn for safeness, recursively walking back to the
#pod root directory.
#pod
#pod For platforms that do not support the L<POSIX|POSIX>
#pod C<_PC_CHOWN_RESTRICTED> symbol (for example, Windows NT) it is
#pod assumed that ``chown() giveaway'' is possible and the recursive test
#pod is performed.
#pod
#pod =back
#pod
#pod The level can be changed as follows:
view all matches for this distribution
view release on metacpan or search on metacpan
KEY_chdir|5.003007||Viu
KEY_CHECK|5.006000||Viu
KEY_chmod|5.003007||Viu
KEY_chomp|5.003007||Viu
KEY_chop|5.003007||Viu
KEY_chown|5.003007||Viu
KEY_chr|5.003007||Viu
KEY_chroot|5.003007||Viu
KEY_close|5.003007||Viu
KEY_closedir|5.003007||Viu
KEY_cmp|5.003007||Viu
PERL_LANGINFO_H|5.027004||Viu
PERL_LAST_5_18_0_INTERP_MEMBER|5.017009||Viu
Perl_ldexp|5.021003||Viu
PerlLIO_access|5.005000||Viu
PerlLIO_chmod|5.005000||Viu
PerlLIO_chown|5.005000||Viu
PerlLIO_chsize|5.005000||Viu
PerlLIO_close|5.005000||Viu
PerlLIO_dup2|5.005000||Viu
PerlLIO_dup2_cloexec|5.027008||Viu
PerlLIO_dup|5.005000||Viu
view all matches for this distribution
view release on metacpan or search on metacpan
KEY_chdir|5.003007||Viu
KEY_CHECK|5.006000||Viu
KEY_chmod|5.003007||Viu
KEY_chomp|5.003007||Viu
KEY_chop|5.003007||Viu
KEY_chown|5.003007||Viu
KEY_chr|5.003007||Viu
KEY_chroot|5.003007||Viu
KEY_close|5.003007||Viu
KEY_closedir|5.003007||Viu
KEY_cmp|5.003007||Viu
PERL_LANGINFO_H|5.027004||Viu
PERL_LAST_5_18_0_INTERP_MEMBER|5.017009||Viu
Perl_ldexp|5.021003|5.021003|n
PerlLIO_access|5.005000||Viu
PerlLIO_chmod|5.005000||Viu
PerlLIO_chown|5.005000||Viu
PerlLIO_chsize|5.005000||Viu
PerlLIO_close|5.005000||Viu
PerlLIO_dup2|5.005000||Viu
PerlLIO_dup2_cloexec|5.027008||Viu
PerlLIO_dup|5.005000||Viu
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Paranoid.pm view on Meta::CPAN
#no ops qw(backtick system exec);
# :subprocess = system, backtick, exec, fork, glob
# :dangerous = syscall, dump, chroot
# :others = mostly IPC stuff
# :filesys_write = link, unlink, rename, mkdir, rmdir, chmod,
# chown, fcntl
# :sys_db = getpwnet, etc.
#}
sub psecureEnv (;$) {
lib/Paranoid.pm view on Meta::CPAN
places considered dangerous under perl's taint mode. The following functions
should generally have their arguments detainted before using:
exec system open glob
unlink mkdir chdir rmdir
chown chmod umask utime
link symlink kill eval
truncate ioctl fcntl chroot
setpgrp setpriority syscall socket
socketpair bind connect
view all matches for this distribution
view release on metacpan or search on metacpan
contrib/example/deploy.sh view on Meta::CPAN
echo "directory missing: $DIR";
exit;
fi
cp -a ./parley/root/static/user_file ./$DIR/root/static/ 2>/dev/null
sudo chown -R parley:www-data ./$DIR/root/static/user_file/
ls ./$DIR/root/static/user_file/
(cd $DIR && perl Makefile.PL)
./parley/script/parley_email_engine.pl stop
view all matches for this distribution
view release on metacpan or search on metacpan
t/sample.xml view on Meta::CPAN
<summary>Checks if the remote mail server can be used to overwrite files</summary>
<copyright>This script is Copyright (C) 1999 Renaud Deraison</copyright>
</plugin>
<plugin id="10579">
<name>bftpd chown overflow</name>
<version>$Revision: 1.2 $</version>
<family>FTP</family>
<cve_id>CAN-2001-0065, CVE-2000-0943</cve_id>
<bugtraq_id>2120</bugtraq_id>
<category>mixed</category>
view all matches for this distribution
view release on metacpan or search on metacpan
examples/7.0.3/asup01.txt view on Meta::CPAN
wafl.default_nt_user
wafl.default_security_style unix
wafl.default_unix_user pcuser
wafl.maxdirsize 20971 (value might be overwritten in takeover)
wafl.nt_admin_priv_map_to_root on
wafl.root_only_chown on (value might be overwritten in takeover)
wafl.wcc_minutes_valid 20
webdav.enable on
===== SERVICE USAGE =====
Service statistics as of Sun Mar 18 00:00:04 PDT 2012
view all matches for this distribution
view release on metacpan or search on metacpan
};
# if a shadow group exists give it read permissions
my @sgrp = getgrnam("shadow");
if (@sgrp > 1) {
chown 0, $sgrp[2], "/etc/shadow";
chmod 0640, "/etc/shadow";
} else {
chmod 0600, "/etc/shadow";
}
view all matches for this distribution
view release on metacpan or search on metacpan
};
# if a shadow group exists give it read permissions
my @sgrp = getgrnam("shadow");
if (@sgrp > 1) {
chown 0, $sgrp[2], "/etc/shadow";
chmod 0640, "/etc/shadow";
} else {
chmod 0600, "/etc/shadow";
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Path/Class/File/Lockable.pm view on Meta::CPAN
Will croak if the lock file does not exist.
B<Note> that the owner and timestamp in the file contents
are not from a stat() of the file.
They are written
at the time the lock file is created. So chown'ing or touch'ing
a lock file do not alter its status.
See lock_owner() and lock_time() for easier ways to get at specific
information.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Pcore/PgSQL.pm view on Meta::CPAN
my $db_dir = "$self->{data_dir}/db/";
# create and prepare data dir
P->file->mkdir( $self->{data_dir} ) if !-d $self->{data_dir};
my $uid = getpwnam 'postgres';
chown $uid, $uid, $self->{data_dir} or die;
# init db
if ( $self->is_empty ) {
my $pwfile = "$self->{data_dir}/pgsql-password.txt";
lib/Pcore/PgSQL.pm view on Meta::CPAN
say "GENERATED POSTGRES PASSWORD: $superuser_password\n";
}
P->file->write_bin( $pwfile, $superuser_password );
chown $uid, $uid, $pwfile or die;
my $proc = P->sys->run_proc( [ 'su', 'postgres', '-c', "initdb --encoding UTF8 --no-locale -U postgres --pwfile $pwfile -D $db_dir" ] )->wait;
unlink $pwfile or 1;
lib/Pcore/PgSQL.pm view on Meta::CPAN
q[host all all 0.0.0.0/0 md5], # require password, when user is connected via TCP
]
);
P->file->mkdir("$db_dir/conf.d") or die;
chown $uid, $uid, "$db_dir/conf.d" or die;
P->file->append_text( "$db_dir/postgresql.conf", [q[include_dir = 'conf.d']] );
}
# default listen settings
lib/Pcore/PgSQL.pm view on Meta::CPAN
# timescaledb extension
push $postgres_conf->@*, q[shared_preload_libraries = 'timescaledb'] if $ENV{TIMESCALEDB};
P->file->write_text( "$db_dir/conf.d/00init.conf", $postgres_conf );
chown $uid, $uid, "$db_dir/conf.d/00init.conf" or die;
# create and prepare unix socket dir
P->file->mkdir('/var/run/postgresql') if !-d '/var/run/postgresql';
chown $uid, $uid, '/var/run/postgresql' or die;
# run server
return P->sys->run_proc( [ 'su', 'postgres', '-c', "postgres -D $db_dir" ] )->wait;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Pcore/Dist/Build/Deploy.pm view on Meta::CPAN
else {
P->file->chmod( 'rw-r--r--', $path ) or say "$!: $path";
}
}
chown $>, $), $path or say "$!: $path"; # EUID, EGID
}
}
say 'done';
view all matches for this distribution