From 35bc172d3c16b3c8f6d98b83930344cc232392cb Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 28 Feb 1994 01:55:10 +0000 Subject: [PATCH] saved current umask ans restores it --- check.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/check.c b/check.c index 83fed9523..74bf0e41f 100644 --- a/check.c +++ b/check.c @@ -77,15 +77,16 @@ static int timedir_is_good; void check_user() { register int rtn; + mode_t oldmask; - umask(077); /* make sure the timestamp files are private */ + oldmask = umask(077); /* make sure the timestamp files are private */ rtn = check_timestamp(); if (rtn && uid) /* if timestamp is not current... */ check_passwd(); update_timestamp(); - umask(022); /* want a real umask to exec() the command */ + (void) umask(oldmask); /* want a real umask to exec() the command */ } -- 2.40.0