Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
fbf4af3a
Commit
fbf4af3a
authored
Jan 23, 2011
by
Chong Yidong
Browse files
* movemail.c (main): Use setregid, as setegid is missing on HP-UX (Bug#6811).
Suggested by Peter O'Gorman.
parent
19634648
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
lib-src/ChangeLog
lib-src/ChangeLog
+5
-0
lib-src/movemail.c
lib-src/movemail.c
+4
-4
No files found.
lib-src/ChangeLog
View file @
fbf4af3a
2011-01-23 Chong Yidong <cyd@stupidchicken.com>
* movemail.c (main): Use setregid instead of setegid, which is
missing on older systems. Suggested by Peter O'Gorman (Bug#6811).
2011-01-02 Glenn Morris <rgm@gnu.org>
* ebrowse.c (version) <emacs_copyright>:
...
...
lib-src/movemail.c
View file @
fbf4af3a
...
...
@@ -360,7 +360,7 @@ main (argc, argv)
time_t
touched_lock
,
now
;
#endif
if
(
setuid
(
getuid
())
<
0
||
setegid
(
real_gid
)
<
0
)
if
(
setuid
(
getuid
())
<
0
||
set
r
egid
(
-
1
,
real_gid
)
<
0
)
fatal
(
"Failed to drop privileges"
,
0
,
0
);
#ifndef MAIL_USE_MMDF
...
...
@@ -387,7 +387,7 @@ main (argc, argv)
if
(
outdesc
<
0
)
pfatal_with_name
(
outname
);
if
(
setegid
(
priv_gid
)
<
0
)
if
(
set
r
egid
(
-
1
,
priv_gid
)
<
0
)
fatal
(
"Failed to regain privileges"
,
0
,
0
);
/* This label exists so we can retry locking
...
...
@@ -484,7 +484,7 @@ main (argc, argv)
#endif
/* Prevent symlink attacks truncating other users' mailboxes */
if
(
setegid
(
real_gid
)
<
0
)
if
(
set
r
egid
(
-
1
,
real_gid
)
<
0
)
fatal
(
"Failed to drop privileges"
,
0
,
0
);
/* Check to make sure no errors before we zap the inbox. */
...
...
@@ -519,7 +519,7 @@ main (argc, argv)
#endif
/* not MAIL_USE_SYSTEM_LOCK */
/* End of mailbox truncation */
if
(
setegid
(
priv_gid
)
<
0
)
if
(
set
r
egid
(
-
1
,
priv_gid
)
<
0
)
fatal
(
"Failed to regain privileges"
,
0
,
0
);
#ifdef MAIL_USE_MAILLOCK
...
...
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