]> Dogcows Code - chaz/tar/blobdiff - src/extract.c
tar: don't assume root is uid 0
[chaz/tar] / src / extract.c
index bd5e7bf588daecfa0da25ef9fa1bc64957e1be8e..e35c8f64d4cff763397aec98abedef3c2ee61ea6 100644 (file)
@@ -23,6 +23,7 @@
 #include <quotearg.h>
 #include <errno.h>
 #include <priv-set.h>
+#include <root-uid.h>
 #include <utimens.h>
 
 #include "common.h"
@@ -153,7 +154,7 @@ struct string_list
 void
 extr_init (void)
 {
-  we_are_root = geteuid () == 0;
+  we_are_root = geteuid () == ROOT_UID;
   same_permissions_option += we_are_root;
   same_owner_option += we_are_root;
 
@@ -1386,7 +1387,7 @@ prepare_to_extract (char const *file_name, int typeflag, tar_extractor_t *fun)
     default:
       WARNOPT (WARN_UNKNOWN_CAST,
               (0, 0,
-               _("%s: Unknown file type `%c', extracted as normal file"),
+               _("%s: Unknown file type '%c', extracted as normal file"),
                quotearg_colon (file_name), typeflag));
       *fun = extract_file;
     }
This page took 0.022156 seconds and 4 git commands to generate.