(cp_options_init): Use chown_privileges rather than geteuid.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 31 May 2005 06:16:09 +0000 (06:16 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 31 May 2005 06:16:09 +0000 (06:16 +0000)
src/install.c
src/mv.c

index 28bba8a..6b5a66a 100644 (file)
@@ -134,7 +134,7 @@ cp_option_init (struct cp_options *x)
   x->hard_link = false;
   x->interactive = I_UNSPECIFIED;
   x->move_mode = false;
-  x->myeuid = geteuid ();
+  x->chown_privileges = chown_privileges ();
   x->one_file_system = false;
   x->preserve_ownership = false;
   x->preserve_links = false;
index 6caff2a..075acc8 100644 (file)
--- a/src/mv.c
+++ b/src/mv.c
@@ -121,7 +121,7 @@ cp_option_init (struct cp_options *x)
   x->hard_link = false;
   x->interactive = I_UNSPECIFIED;
   x->move_mode = true;
-  x->myeuid = geteuid ();
+  x->chown_privileges = chown_privileges ();
   x->one_file_system = false;
   x->preserve_ownership = true;
   x->preserve_links = true;