Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make some RERR_* choices better, and another noop_io_until_death() tweak.
[rsync/rsync.git]
/
lib
/
sysacls.c
diff --git
a/lib/sysacls.c
b/lib/sysacls.c
index
071b06f
..
19d4d7a
100644
(file)
--- a/
lib/sysacls.c
+++ b/
lib/sysacls.c
@@
-551,7
+551,7
@@
SMB_ACL_T sys_acl_init(int count)
* acl[] array, this actually allocates an ACL with room
* for (count+1) entries
*/
* acl[] array, this actually allocates an ACL with room
* for (count+1) entries
*/
- if ((a = (SMB_ACL_T)SMB_MALLOC(sizeof
(struct SMB_ACL_T) + count * sizeof
(struct acl))) == NULL) {
+ if ((a = (SMB_ACL_T)SMB_MALLOC(sizeof
a[0] + count * sizeof
(struct acl))) == NULL) {
errno = ENOMEM;
return NULL;
}
errno = ENOMEM;
return NULL;
}
@@
-1007,7
+1007,7
@@
SMB_ACL_T sys_acl_init(int count)
* acl[] array, this actually allocates an ACL with room
* for (count+1) entries
*/
* acl[] array, this actually allocates an ACL with room
* for (count+1) entries
*/
- if ((a =
SMB_MALLOC(sizeof(struct SMB_ACL_T)
+ count * sizeof(struct acl))) == NULL) {
+ if ((a =
(SMB_ACL_T)SMB_MALLOC(sizeof a[0]
+ count * sizeof(struct acl))) == NULL) {
errno = ENOMEM;
return NULL;
}
errno = ENOMEM;
return NULL;
}
@@
-1638,14
+1638,14
@@
SMB_ACL_T sys_acl_init(int count)
return NULL;
}
return NULL;
}
- if ((a =
SMB_MALLOC(sizeof(struct SMB_ACL_T) + sizeof
(struct acl))) == NULL) {
+ if ((a =
(SMB_ACL_T)SMB_MALLOC(sizeof a[0] + sizeof
(struct acl))) == NULL) {
errno = ENOMEM;
return NULL;
}
a->next = -1;
a->freeaclp = False;
errno = ENOMEM;
return NULL;
}
a->next = -1;
a->freeaclp = False;
- a->aclp = (struct acl *)(
&a->aclp + sizeof(struct acl *)
);
+ a->aclp = (struct acl *)(
(char *)a + sizeof a[0]
);
a->aclp->acl_cnt = 0;
return a;
a->aclp->acl_cnt = 0;
return a;
@@
-1815,7
+1815,11
@@
SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type)
/* AIX has no DEFAULT */
if ( type == SMB_ACL_TYPE_DEFAULT ) {
/* AIX has no DEFAULT */
if ( type == SMB_ACL_TYPE_DEFAULT ) {
+#ifdef ENOTSUP
errno = ENOTSUP;
errno = ENOTSUP;
+#else
+ errno = ENOSYS;
+#endif
return NULL;
}
return NULL;
}