summaryrefslogtreecommitdiffstats
path: root/liblock
diff options
context:
space:
mode:
authorSam Varshavchik2013-11-24 21:12:06 -0500
committerSam Varshavchik2013-11-24 21:12:06 -0500
commit39ce29711f39afa228868f9b9cf2cc851fe6d3d7 (patch)
tree6020aca2c90683bb5023a69a8e963caa47d3d730 /liblock
parent4d91075b1b90f68527304b45bb26637a17e1454d (diff)
downloadcourier-libs-39ce29711f39afa228868f9b9cf2cc851fe6d3d7.tar.bz2
Fix compiler warning, unchecked return values.
Diffstat (limited to 'liblock')
-rw-r--r--liblock/lockmail.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/liblock/lockmail.c b/liblock/lockmail.c
index a2c81ee..fda0799 100644
--- a/liblock/lockmail.c
+++ b/liblock/lockmail.c
@@ -159,8 +159,12 @@ int main(int argc, char **argv)
if (pid == 0)
{
- setgid(getgid());
- setuid(getuid());
+ if (setgid(getgid()) < 0 ||
+ setuid(getuid()) < 0)
+ {
+ perror("setuid/setgid");
+ exit(1);
+ }
(void)caught();
execvp(argvec[0], argvec);