summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1995-11-03 19:59:44 +0000
committerJim Meyering <jim@meyering.net>1995-11-03 19:59:44 +0000
commit83780d95f06e77a9d86e894a6c07ba37e17bbe6a (patch)
tree406f2481bd50e24dd103a80793f4711ba795b60f
parent5b804afa6a5aa57c89e29f4e959253575a512aff (diff)
downloadcoreutils-83780d95f06e77a9d86e894a6c07ba37e17bbe6a.tar.xz
(copy): Use euidaccess instead of euidaccess_stat.
-rw-r--r--src/cp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cp.c b/src/cp.c
index 718d059a8..455e66168 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))
{