From 83780d95f06e77a9d86e894a6c07ba37e17bbe6a Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 3 Nov 1995 19:59:44 +0000 Subject: [PATCH] (copy): Use euidaccess instead of euidaccess_stat. --- src/cp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cp.c b/src/cp.c index 718d059a89..455e661682 100644 --- a/src/cp.c +++ b/src/cp.c @@ -48,7 +48,7 @@ int lstat (); char *dirname (); char *xstrdup (); enum backup_type get_version (); -int eaccess_stat (); +int euidaccess (); int full_write (); static int do_copy (); @@ -556,7 +556,7 @@ copy (src_path, dst_path, new_dst, device, ancestors) { if (flag_interactive) { - if (eaccess_stat (&dst_sb, W_OK, dst_path) != 0) + if (euidaccess (dst_path, W_OK) != 0) fprintf (stderr, "%s: overwrite `%s', overriding mode %04o? ", program_name, dst_path, @@ -594,7 +594,7 @@ copy (src_path, dst_path, new_dst, device, ancestors) if (S_ISDIR (dst_sb.st_mode)) { /* Temporarily change mode to allow overwriting. */ - if (eaccess_stat (&dst_sb, W_OK | X_OK, dst_path) != 0) + if (euidaccess (dst_path, W_OK | X_OK) != 0) { if (chmod (dst_path, 0700)) { -- 2.47.3