view release on metacpan or search on metacpan
share/P6STD/CORE.setting view on Meta::CPAN
my proto flip {*}
my proto take {*}
my proto take-rw {*}
my proto splice {*}
my proto slurp {*}
my proto get {*}
my proto lines {*}
my proto getc {*}
my proto prompt {*}
my proto chdir {*}
my proto chmod {*}
my proto zip {*}
my proto each {*}
my proto roundrobin {*}
my proto return {*}
my proto return-rw {*}
my proto leave {*}
my proto make {*}
my proto pop {*}
my proto shift {*}
share/PerlCritic/Critic/Policy/InputOutput/RequireCheckedSyscalls.pm view on Meta::CPAN
#-----------------------------------------------------------------------------
Readonly::Scalar my $DESC => q{Return value of flagged function ignored};
Readonly::Scalar my $EXPL => [208, 278];
Readonly::Array my @DEFAULT_FUNCTIONS => qw(
open close print say
);
# I created this list by searching for "return" in perlfunc
Readonly::Array my @BUILTIN_FUNCTIONS => qw(
accept bind binmode chdir chmod chown close closedir connect
dbmclose dbmopen exec fcntl flock fork ioctl kill link listen
mkdir msgctl msgget msgrcv msgsnd open opendir pipe print read
readdir readline readlink readpipe recv rename rmdir say seek seekdir
semctl semget semop send setpgrp setpriority setsockopt shmctl
shmget shmread shutdown sleep socket socketpair symlink syscall
sysopen sysread sysseek system syswrite tell telldir truncate
umask unlink utime wait waitpid
);
#-----------------------------------------------------------------------------
share/PerlCritic/Critic/Policy/ValuesAndExpressions/ProhibitLeadingZeros.pm view on Meta::CPAN
Readonly::Scalar my $LEADING_RX => qr<\A [+-]? (?: 0+ _* )+ [1-9]>xms;
Readonly::Scalar my $EXPL => [ 58 ];
#-----------------------------------------------------------------------------
sub supported_parameters {
return (
{
name => 'strict',
description =>
q<Don't allow any leading zeros at all. Otherwise builtins that deal with Unix permissions, e.g. chmod, don't get flagged.>,
default_string => '0',
behavior => 'boolean',
},
);
}
sub default_severity { return $SEVERITY_HIGHEST }
sub default_themes { return qw< core pbp bugs > }
sub applies_to { return 'PPI::Token::Number::Octal' }
#-----------------------------------------------------------------------------
sub violates {
my ( $self, $elem, undef ) = @_;
return if $elem !~ $LEADING_RX;
return $self->_create_violation($elem) if $self->{_strict};
return if $self->_is_first_argument_of_chmod_or_umask($elem);
return if $self->_is_second_argument_of_mkdir($elem);
return if $self->_is_third_argument_of_dbmopen($elem);
return if $self->_is_fourth_argument_of_sysopen($elem);
return $self->_create_violation($elem);
}
sub _create_violation {
my ($self, $elem) = @_;
return $self->violation(
qq<Integer with leading zeros: "$elem">,
$EXPL,
$elem
);
}
sub _is_first_argument_of_chmod_or_umask {
my ($self, $elem) = @_;
my $previous_token = _previous_token_that_isnt_a_parenthesis($elem);
return if not $previous_token;
my $content = $previous_token->content();
return $content eq 'chmod' || $content eq 'umask';
}
sub _is_second_argument_of_mkdir {
my ($self, $elem) = @_;
# Preceding comma.
my $previous_token = _previous_token_that_isnt_a_parenthesis($elem);
return if not $previous_token;
return if $previous_token->content() ne $COMMA; # Don't know what it is.
share/PerlCritic/Critic/Policy/ValuesAndExpressions/ProhibitLeadingZeros.pm view on Meta::CPAN
=head1 DESCRIPTION
Perl interprets numbers with leading zeros as octal. If that's what
you really want, its better to use C<oct> and make it obvious.
$var = 041; # not ok, actually 33
$var = oct(41); # ok
chmod 0644, $file; # ok by default
dbmopen %database, 'foo.db', 0600; # ok by default
mkdir $directory, 0755; # ok by default
sysopen $filehandle, $filename, O_RDWR, 0666; # ok by default
umask 0002; # ok by default
=head1 CONFIGURATION
If you want to ban all leading zeros, set C<strict> to a true value in
a F<.perlcriticrc> file.
share/PerlCritic/Critic/Utils.pm view on Meta::CPAN
return exists $FILEHANDLES{ _name_for_sub_or_stringified_element($elem) };
}
## use critic
#-----------------------------------------------------------------------------
# egrep '=item.*LIST' perlfunc.pod
Readonly::Hash my %BUILTINS_WHICH_PROVIDE_LIST_CONTEXT =>
hashify(
qw{
chmod
chown
die
exec
formline
grep
import
join
kill
map
no
share/PerlCritic/Critic/Utils.pm view on Meta::CPAN
# Otherwise, return. this system call is unchecked.
return 1;
}
# Based upon autodie 2.10.
Readonly::Hash my %AUTODIE_PARAMETER_TO_AFFECTED_BUILTINS_MAP => (
# Map builtins to themselves.
(
map { $_ => { hashify( $_ ) } }
qw<
accept bind binmode chdir chmod close closedir connect
dbmclose dbmopen exec fcntl fileno flock fork getsockopt ioctl
link listen mkdir msgctl msgget msgrcv msgsnd open opendir
pipe read readlink recv rename rmdir seek semctl semget semop
send setsockopt shmctl shmget shmread shutdown socketpair
symlink sysopen sysread sysseek system syswrite truncate umask
unlink
>
),
# Generate these using tools/dump-autodie-tag-contents
':threads' => { hashify( qw< fork > ) },
':system' => { hashify( qw< exec system > ) },
':dbm' => { hashify( qw< dbmclose dbmopen > ) },
':semaphore' => { hashify( qw< semctl semget semop > ) },
':shm' => { hashify( qw< shmctl shmget shmread > ) },
':msg' => { hashify( qw< msgctl msgget msgrcv msgsnd > ) },
':file' => {
hashify(
qw<
binmode chmod close fcntl fileno flock ioctl open sysopen
truncate
>
)
},
':filesys' => {
hashify(
qw<
chdir closedir link mkdir opendir readlink rename rmdir
symlink umask unlink
>
share/PerlCritic/Critic/Utils.pm view on Meta::CPAN
hashify(
qw<
accept bind connect getsockopt listen recv send setsockopt
shutdown socketpair
>
)
},
':io' => {
hashify(
qw<
accept bind binmode chdir chmod close closedir connect
dbmclose dbmopen fcntl fileno flock getsockopt ioctl link
listen mkdir msgctl msgget msgrcv msgsnd open opendir pipe
read readlink recv rename rmdir seek semctl semget semop send
setsockopt shmctl shmget shmread shutdown socketpair symlink
sysopen sysread sysseek syswrite truncate umask unlink
>
)
},
':default' => {
hashify(
qw<
accept bind binmode chdir chmod close closedir connect
dbmclose dbmopen fcntl fileno flock fork getsockopt ioctl link
listen mkdir msgctl msgget msgrcv msgsnd open opendir pipe
read readlink recv rename rmdir seek semctl semget semop send
setsockopt shmctl shmget shmread shutdown socketpair symlink
sysopen sysread sysseek syswrite truncate umask unlink
>
)
},
':all' => {
hashify(
qw<
accept bind binmode chdir chmod close closedir connect
dbmclose dbmopen exec fcntl fileno flock fork getsockopt ioctl
link listen mkdir msgctl msgget msgrcv msgsnd open opendir
pipe read readlink recv rename rmdir seek semctl semget semop
send setsockopt shmctl shmget shmread shutdown socketpair
symlink sysopen sysread sysseek system syswrite truncate umask
unlink
>
)
},
);
share/SpamAssassin/easy_ham/01427.7c150370fd480849df4e8ab564d88fe9 view on Meta::CPAN
Well, (a) you don't HAVE to upgrade, and (b) what you are doing has never
been safe in the first place because SpamAssassin 2.31-and-before doesn't
do any kind of file locking while it writes to the mailbox and doesn't
promise to return the proper failure code on disk-full conditions, etc.
If you're still willing to live with (b), all you need is a little shell
script to run spamassassin:
----------
#!/bin/sh
# call this file "spamassassin-wrapper" and chmod +x it
{
echo "From $1 `date`"
sed -e '1{/^From /d;}' | spamassassin
echo ''
} >> $MAIL
----------
And then use
fetchmail --mda 'spamassassin-wrapper %F'
share/SpamAssassin/easy_ham/01566.d3880fbc5242d59335e33c7485ac692e view on Meta::CPAN
List-Archive: <http://www.geocrawler.com/redir-sf.php3?list=razor-users>
X-Original-Date: Thu, 5 Sep 2002 19:02:52 -0500 (EST)
Date: Thu, 5 Sep 2002 19:02:52 -0500 (EST)
Shouldn't there be a w, somewhere in tehre? Simply setting group and
owner to read and execute won't alleviate a write problem.
On Thu, 5 Sep 2002, Michael Duff wrote:
> This is due to insufficient write privileges to the "razor-agent.log"
> file. A quick work-around is to do a "chmod go+rx" on that file (of
> course, it's better to restrict the access as much as possible).
>
> In Agent.pm, when the Razor2::Logger object is created, if it doesn't
> have write permission to the log file it does not succeed. Then, later
> in the code when the log object is used, it fails with the "unblessed"
> error.
>
> Hope this helps,
> Michael Duff
>
share/SpamAssassin/easy_ham/01569.f7c58b134199bd4d821ca41598e7d79c view on Meta::CPAN
List-Subscribe: <https://example.sourceforge.net/lists/listinfo/razor-users>,
<mailto:razor-users-request@lists.sourceforge.net?subject=subscribe>
List-Id: <razor-users.example.sourceforge.net>
List-Unsubscribe: <https://example.sourceforge.net/lists/listinfo/razor-users>,
<mailto:razor-users-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive: <http://www.geocrawler.com/redir-sf.php3?list=razor-users>
X-Original-Date: Thu, 05 Sep 2002 16:37:47 -0700
Date: Thu, 05 Sep 2002 16:37:47 -0700
This is due to insufficient write privileges to the "razor-agent.log"
file. A quick work-around is to do a "chmod go+rx" on that file (of
course, it's better to restrict the access as much as possible).
In Agent.pm, when the Razor2::Logger object is created, if it doesn't
have write permission to the log file it does not succeed. Then, later
in the code when the log object is used, it fails with the "unblessed"
error.
Hope this helps,
Michael Duff
share/SpamAssassin/easy_ham/01576.6b733eba3bd6a287e0ef2a99b9afbd68 view on Meta::CPAN
<mailto:razor-users-request@lists.sourceforge.net?subject=subscribe>
List-Id: <razor-users.example.sourceforge.net>
List-Unsubscribe: <https://example.sourceforge.net/lists/listinfo/razor-users>,
<mailto:razor-users-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive: <http://www.geocrawler.com/redir-sf.php3?list=razor-users>
X-Original-Date: Thu, 5 Sep 2002 17:31:53 -0500
Date: Thu, 5 Sep 2002 17:31:53 -0500
No as a answer to this FAQ, would the recommended answer be to
a) chmod 755 /usr/bin/procmail
or
b) add DROPPRIVS=yes to /etc/procmailrc
or
c) all of the above
share/SpamAssassin/easy_ham/01611.f2803c52f689e2139f8ebb09ed5a8d91 view on Meta::CPAN
List-Id: <razor-users.example.sourceforge.net>
List-Unsubscribe: <https://example.sourceforge.net/lists/listinfo/razor-users>,
<mailto:razor-users-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive: <http://www.geocrawler.com/redir-sf.php3?list=razor-users>
X-Original-Date: Thu, 29 Aug 2002 12:17:27 -0700
Date: Thu, 29 Aug 2002 12:17:27 -0700
This is happening due to insufficient write access to the
"razor-agent.log" file. I was getting the same error, but
only as a non-root user. As a quick workaround, you can do
"chmod go+w razor-agent.log".
In Agent.pm, when then the Logger object is created, it
doesn't check whether the logfile is writable by the current
user. Then, when a write attempt is made, it bails out with
the "unblessed reference" error.
Hope that helps,
Michael
> I just noticed the following log entries in my syslog with the latest