From: Peter Howkins Date: Tue, 30 Dec 2014 16:12:54 +0000 (+0000) Subject: dtaction: resolve 2 compiler warnings. X-Git-Tag: 2.2.3~55 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4a66f1ab61f7d220e79d9afe018d857a3d5bc833;p=oweals%2Fcde.git dtaction: resolve 2 compiler warnings. --- diff --git a/cde/programs/dtaction/Main.c b/cde/programs/dtaction/Main.c index 25712fcf..edacc445 100644 --- a/cde/programs/dtaction/Main.c +++ b/cde/programs/dtaction/Main.c @@ -404,7 +404,9 @@ SetGidUid ( unsigned short rgid, unsigned short ruid ) #if defined(SVR4) || defined(_AIX) setgid(rgid); #elif defined(__osf__) || defined(linux) || defined(CSRG_BASED) - setregid(rgid, rgid); + if(-1 == setregid(rgid, rgid)) { + fprintf(stderr, "SetGidUid: setregid failed on %d\n", rgid); + } #elif defined(__hpux) setresgid(rgid, rgid, rgid); #else @@ -415,7 +417,9 @@ SetGidUid ( unsigned short rgid, unsigned short ruid ) #if defined (SVR4) || defined (_AIX) setuid(ruid); #elif defined(__osf__) || defined(linux) || defined(CSRG_BASED) - setreuid(ruid, ruid); + if(-1 == setreuid(ruid, ruid)) { + fprintf(stderr, "SetGidUid: setreuid failed on %d\n", ruid); + } #elif defined(__hpux) setresuid(ruid, ruid, ruid); #else