* main.c (main): Fix cleanup code for setluid() failure
authorTom Yu <tlyu@mit.edu>
Fri, 12 Mar 1999 23:53:02 +0000 (23:53 +0000)
committerTom Yu <tlyu@mit.edu>
Fri, 12 Mar 1999 23:53:02 +0000 (23:53 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11276 dc483132-0cff-0310-8789-dd5450dbe970

src/clients/ksu/ChangeLog
src/clients/ksu/main.c

index 647a84a4b2b5a0cbf443bfeb026632c03988e5c2..44dc8989d4c4993cd9c78cc9c0022605a019e263 100644 (file)
@@ -1,3 +1,7 @@
+Fri Mar 12 18:52:18 1999  Tom Yu  <tlyu@mit.edu>
+
+       * main.c (main): Fix cleanup code for setluid() failure.
+
 Thu Mar  4 18:46:55 1999  Tom Yu  <tlyu@mit.edu>
 
        * heuristic.c (get_authorized_princ_names): Fix to not call
index 44c270350b6a06c2e912d04a4ac0247e74a781c5..de7cef67dc49f06078b8a9dbb69dfdfdbf343393 100644 (file)
@@ -807,7 +807,8 @@ krb5_seteuid(0); /*So we have some chance of sweeping up*/
         */
        if (setluid((uid_t) pwd->pw_uid) < 0) {
                perror("setuid");
-               sleepexit(1);
+               sweep_up(ksu_context, use_source_cache, cc_target);
+               exit(1);
        }
 #endif /* HAVE_SETLUID */