Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
11b02d92
Commit
11b02d92
authored
Oct 16, 2007
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding Wesley Terpstra's lchmod()-equivalent that uses setattrlist().
parent
5cefa088
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
syscall.c
syscall.c
+11
-0
No files found.
syscall.c
View file @
11b02d92
...
@@ -25,6 +25,9 @@
...
@@ -25,6 +25,9 @@
#if !defined MKNOD_CREATES_SOCKETS && defined HAVE_SYS_UN_H
#if !defined MKNOD_CREATES_SOCKETS && defined HAVE_SYS_UN_H
#include <sys/un.h>
#include <sys/un.h>
#endif
#endif
#ifdef HAVE_SYS_ATTR_H
#include <sys/attr.h>
#endif
extern
int
dry_run
;
extern
int
dry_run
;
extern
int
am_root
;
extern
int
am_root
;
...
@@ -151,6 +154,14 @@ int do_chmod(const char *path, mode_t mode)
...
@@ -151,6 +154,14 @@ int do_chmod(const char *path, mode_t mode)
if
(
S_ISLNK
(
mode
))
{
if
(
S_ISLNK
(
mode
))
{
#ifdef HAVE_LCHMOD
#ifdef HAVE_LCHMOD
code
=
lchmod
(
path
,
mode
&
CHMOD_BITS
);
code
=
lchmod
(
path
,
mode
&
CHMOD_BITS
);
#elif defined HAVE_SETATTRLIST
struct
attrlist
attrList
;
uint32_t
m
=
mode
&
CHMOD_BITS
;
/* manpage is wrong: not mode_t! */
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
);
#else
#else
code
=
1
;
code
=
1
;
#endif
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment