]> andersk Git - moira.git/commitdiff
Make "user foo" in moira.conf actually work.
authorzacheiss <zacheiss>
Sun, 27 Jul 2003 11:26:03 +0000 (11:26 +0000)
committerzacheiss <zacheiss>
Sun, 27 Jul 2003 11:26:03 +0000 (11:26 +0000)
update/get_file.c

index be50013a61aac9213d483e06254aecef2a077ac6..87eeb959643d02de2e1516d64dbe40fe4a829dab 100644 (file)
@@ -91,11 +91,6 @@ int get_file(int conn, char *pathname, int file_size, int checksum,
       code = errno;
       com_err(whoami, errno, "creating file %s (get_file)", pathname);
       send_int(conn, code);
-      if (setuid(0) < 0)
-       {
-         com_err(whoami, errno, "Unable to setuid back to %d\n", 0);
-         exit(1);
-       }
       return 1;
     }
 
@@ -116,12 +111,6 @@ int get_file(int conn, char *pathname, int file_size, int checksum,
          unlink(pathname);
          ftruncate(fd, 0);
          close(fd);
-
-         if (setuid(0) < 0)
-           {
-             com_err(whoami, errno, "Unable to setuid back to %d\n", 0);
-             exit(1);
-           }
          return 1;
        }
       n_written += n_wrote;
@@ -145,11 +134,6 @@ int get_file(int conn, char *pathname, int file_size, int checksum,
        {
          /* get_block has already printed a message */
          unlink(pathname);
-         if (setuid(0) < 0)
-           {
-             com_err(whoami, errno, "Unable to setuid back to %d\n", 0);
-             exit(1);
-           }
          return 1;
        }
       n_written += n_got;
@@ -162,12 +146,6 @@ int get_file(int conn, char *pathname, int file_size, int checksum,
   fsync(fd);
   close(fd);
 
-  if (setuid(0) < 0)
-    {
-      com_err(whoami, errno, "Unable to setuid back to %d\n", 0);
-      exit(1);
-    }
-
   /* validate checksum */
   found_checksum = checksum_file(pathname);
   if (checksum != found_checksum)
This page took 0.041532 seconds and 5 git commands to generate.