From: Jim Meyering Date: Fri, 3 Nov 1995 19:59:44 +0000 (+0000) Subject: (copy): Use euidaccess instead of euidaccess_stat. X-Git-Tag: FILEUTILS-3_12f~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=83780d95f06e77a9d86e894a6c07ba37e17bbe6a;p=platform%2Fupstream%2Fcoreutils.git (copy): Use euidaccess instead of euidaccess_stat. --- diff --git a/src/cp.c b/src/cp.c index 718d059..455e661 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)) {