summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--atd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/atd.c b/atd.c
index 176f431..2c497d9 100644
--- a/atd.c
+++ b/atd.c
@@ -249,7 +249,10 @@ run_file(const char *filename, uid_t uid, gid_t gid)
* somebody else has already locked it (a second atd?); log the
* fact and return.
*/
- if (link(filename, newname) == -1) {
+ PRIV_START
+ rc = link(filename, newname);
+ PRIV_END
+ if (rc == -1) {
if (errno == EEXIST) {
free(mailname);
free(newname);