X-Git-Url: http://git.samba.org/?a=blobdiff_plain;f=syscall.c;h=d92074aaadc20f595c6d381a24d6eefb0f90d416;hb=cd76993461d929aa44fabde9f5eff0791358c996;hp=56948a8327a4c576c41c79f1ade28fc7962ee9ff;hpb=296352ecb0175fa3c37de550dd57aeff39632095;p=rsync.git diff --git a/syscall.c b/syscall.c index 56948a83..d92074aa 100644 --- a/syscall.c +++ b/syscall.c @@ -4,7 +4,7 @@ * * Copyright (C) 1998 Andrew Tridgell * Copyright (C) 2002 Martin Pool - * Copyright (C) 2003-2020 Wayne Davison + * Copyright (C) 2003-2022 Wayne Davison * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -247,7 +247,7 @@ int do_chmod(const char *path, mode_t mode) else if (errno != ENOTSUP) break; #endif - + /* FALLTHROUGH */ default: if (S_ISLNK(mode)) { # if defined HAVE_SETATTRLIST @@ -257,7 +257,10 @@ int do_chmod(const char *path, mode_t mode) memset(&attrList, 0, sizeof attrList); attrList.bitmapcount = ATTR_BIT_MAP_COUNT; attrList.commonattr = ATTR_CMN_ACCESSMASK; - code = setattrlist(path, &attrList, &m, sizeof m, FSOPT_NOFOLLOW); + if ((code = setattrlist(path, &attrList, &m, sizeof m, FSOPT_NOFOLLOW)) == 0) + break; + if (errno == ENOTSUP) + code = 1; # else code = 1; # endif