Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
ae8a18de
Commit
ae8a18de
authored
Apr 07, 2002
by
bbaetz%student.usyd.edu.au
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 134575 - some scripts trying to make world writable directories
r=justdave, gerv
parent
09c6150e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
16 deletions
+16
-16
defparams.pl
defparams.pl
+1
-3
globals.pl
globals.pl
+13
-3
importxml.pl
importxml.pl
+1
-5
move.pl
move.pl
+1
-5
No files found.
defparams.pl
View file @
ae8a18de
...
...
@@ -64,8 +64,6 @@ sub WriteParams {
delete
$::param
{
$item
};
}
}
mkdir
(
"data"
,
0777
);
chmod
0777
,
"data"
;
my
$tmpname
=
"data/params.$$"
;
open
(
FID
,
">$tmpname"
)
||
die
"Can't create $tmpname"
;
my
$v
=
$::param
{
'version'
};
...
...
@@ -76,7 +74,7 @@ sub WriteParams {
print
FID
"1;\n"
;
close
FID
;
rename
$tmpname
,
"data/params"
||
die
"Can't rename $tmpname to data/params"
;
chmod
0666
,
"data/params"
;
ChmodDataFile
(
'data/params'
,
0666
)
;
}
...
...
globals.pl
View file @
ae8a18de
...
...
@@ -117,6 +117,18 @@ $::superusergroupset = "9223372036854775807";
#}
#$::SIG{__DIE__} = \&die_with_dignity;
# Some files in the data directory must be world readable iff we don't have
# a webserver group. Call this function to do this.
sub
ChmodDataFile
($$)
{
my
(
$file
,
$mask
)
=
@_
;
my
$perm
=
0770
;
if
((
stat
(
'data'
))[
2
]
&
0002
)
{
$perm
=
0777
;
}
$perm
=
$perm
&
$mask
;
chmod
$perm
,
$file
;
}
sub
ConnectToDatabase
{
my
(
$useshadow
)
=
(
@_
);
if
(
!
defined
$::db
)
{
...
...
@@ -565,8 +577,6 @@ sub GenerateVersionTable {
my
@list
=
sort
{
uc
(
$a
)
cmp
uc
(
$b
)}
keys
(
%::
versions
);
@::legal_product
=
@list
;
mkdir
(
"data"
,
0777
);
chmod
0777
,
"data"
;
my
$tmpname
=
"data/versioncache.$$"
;
open
(
FID
,
">$tmpname"
)
||
die
"Can't create $tmpname"
;
...
...
@@ -636,7 +646,7 @@ sub GenerateVersionTable {
print
FID
"1;\n"
;
close
FID
;
rename
$tmpname
,
"data/versioncache"
||
die
"Can't rename $tmpname to versioncache"
;
chmod
0666
,
"data/versioncache"
;
ChmodDataFile
(
'data/versioncache'
,
0666
)
;
}
...
...
importxml.pl
View file @
ae8a18de
...
...
@@ -135,11 +135,7 @@ sub Log {
sub
Lock
{
if
(
$::lockcount
<=
0
)
{
$::lockcount
=
0
;
if
(
!
open
(
LOCKFID
,
">>data/maillock"
))
{
mkdir
"data"
,
0777
;
chmod
0777
,
"data"
;
open
(
LOCKFID
,
">>data/maillock"
)
||
die
"Can't open lockfile."
;
}
open
(
LOCKFID
,
">>data/maillock"
)
||
die
"Can't open data/maillock: $!"
;
my
$val
=
flock
(
LOCKFID
,
2
);
if
(
!
$val
)
{
# '2' is magic 'exclusive lock' const.
print
"Content-type: text/html\n\n"
;
...
...
move.pl
View file @
ae8a18de
...
...
@@ -50,11 +50,7 @@ sub Log {
sub
Lock
{
if
(
$::lockcount
<=
0
)
{
$::lockcount
=
0
;
if
(
!
open
(
LOCKFID
,
">>data/maillock"
))
{
mkdir
"data"
,
0777
;
chmod
0777
,
"data"
;
open
(
LOCKFID
,
">>data/maillock"
)
||
die
"Can't open lockfile."
;
}
open
(
LOCKFID
,
">>data/maillock"
)
||
die
"Can't open data/maillock: $!"
;
my
$val
=
flock
(
LOCKFID
,
2
);
if
(
!
$val
)
{
# '2' is magic 'exclusive lock' const.
print
"Content-type: text/html\n\n"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment