summaryrefslogtreecommitdiff
path: root/fml
diff options
context:
space:
mode:
authorfukachan <fukachan>2005-05-27 00:54:29 +0000
committerfukachan <fukachan>2005-05-27 00:54:29 +0000
commita903a001ca5bcf8a01561c9d65d2cc2ef3d971c2 (patch)
tree8b7e9e526a001ef3616c8cf62cdff68986bf0ff7 /fml
parent5341f3f5a47b5c068f7ddc5e789b31ca317360cf (diff)
downloadfml8-a903a001ca5bcf8a01561c9d65d2cc2ef3d971c2.tar.gz
fml8-a903a001ca5bcf8a01561c9d65d2cc2ef3d971c2.tar.bz2
fml8-a903a001ca5bcf8a01561c9d65d2cc2ef3d971c2.zip
set umask(077) in creating a tmp file.
Diffstat (limited to 'fml')
-rw-r--r--fml/lib/FML/IPC/Queue.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/fml/lib/FML/IPC/Queue.pm b/fml/lib/FML/IPC/Queue.pm
index 5e8c7b55..b0631709 100644
--- a/fml/lib/FML/IPC/Queue.pm
+++ b/fml/lib/FML/IPC/Queue.pm
@@ -1,10 +1,10 @@
#-*- perl -*-
#
-# Copyright (C) 2003,2004 Ken'ichi Fukamachi
+# Copyright (C) 2003,2004,2005 Ken'ichi Fukamachi
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: Queue.pm,v 1.8 2004/07/23 15:21:23 fukachan Exp $
+# $FML: Queue.pm,v 1.9 2004/07/23 15:59:07 fukachan Exp $
#
package FML::IPC::Queue;
@@ -125,6 +125,7 @@ sub _append_msg_into_queue_dir
my $tmpfile = File::Spec->catfile($queue_dir, $tmptmp);
my $q_file = File::Spec->catfile($queue_dir, $tmpname);
+ my $cur_umask = umask(077);
use FileHandle;
my $wh = new FileHandle "> $tmpfile";
if (defined $wh) {
@@ -138,6 +139,7 @@ sub _append_msg_into_queue_dir
}
$wh->close();
}
+ umask($cur_umask);
if (-s $tmpfile) {
# initialized to unlocked state (lock == executable bit).
@@ -348,7 +350,7 @@ Ken'ichi Fukamachi
=head1 COPYRIGHT
-Copyright (C) 2003,2004 Ken'ichi Fukamachi
+Copyright (C) 2003,2004,2005 Ken'ichi Fukamachi
All rights reserved. This program is free software; you can
redistribute it and/or modify it under the same terms as Perl itself.