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
Changed "statx" to "stat_x" to try to work around a build problem on AIX.
[rsync/rsync.git]
/
acls.c
diff --git
a/acls.c
b/acls.c
index
cc8d2e9
..
cf79251
100644
(file)
--- a/
acls.c
+++ b/
acls.c
@@
-6,8
+6,9
@@
* Copyright (C) 2006 Wayne Davison
*
* This program is free software; you can redistribute it and/or modify
* Copyright (C) 2006 Wayne Davison
*
* This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@@
-15,8
+16,7
@@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ * with this program; if not, visit the http://fsf.org website.
*/
#include "rsync.h"
*/
#include "rsync.h"
@@
-29,7
+29,6
@@
extern int am_root;
extern int read_only;
extern int list_only;
extern int orig_umask;
extern int read_only;
extern int list_only;
extern int orig_umask;
-extern int protocol_version;
extern int numeric_ids;
extern int inc_recurse;
extern int numeric_ids;
extern int inc_recurse;
@@
-211,7
+210,7
@@
static void rsync_acl_free(rsync_acl *racl)
*racl = empty_rsync_acl;
}
*racl = empty_rsync_acl;
}
-void free_acl(statx *sxp)
+void free_acl(stat
_
x *sxp)
{
if (sxp->acc_acl) {
rsync_acl_free(sxp->acc_acl);
{
if (sxp->acc_acl) {
rsync_acl_free(sxp->acc_acl);
@@
-501,7
+500,7
@@
static int get_rsync_acl(const char *fname, rsync_acl *racl,
}
/* Return the Access Control List for the given filename. */
}
/* Return the Access Control List for the given filename. */
-int get_acl(const char *fname, statx *sxp)
+int get_acl(const char *fname, stat
_
x *sxp)
{
sxp->acc_acl = create_racl();
if (get_rsync_acl(fname, sxp->acc_acl, SMB_ACL_TYPE_ACCESS,
{
sxp->acc_acl = create_racl();
if (get_rsync_acl(fname, sxp->acc_acl, SMB_ACL_TYPE_ACCESS,
@@
-600,9
+599,9
@@
static void send_rsync_acl(rsync_acl *racl, SMB_ACL_TYPE_T type,
}
}
}
}
-/* Send the ACL from the statx structure down the indicated file descriptor.
+/* Send the ACL from the stat
_
x structure down the indicated file descriptor.
* This also frees the ACL data. */
* This also frees the ACL data. */
-void send_acl(statx *sxp, int f)
+void send_acl(stat
_
x *sxp, int f)
{
if (!sxp->acc_acl) {
sxp->acc_acl = create_racl();
{
if (!sxp->acc_acl) {
sxp->acc_acl = create_racl();
@@
-741,7
+740,7
@@
void receive_acl(struct file_struct *file, int f)
F_ACL(file) = recv_rsync_acl(&access_acl_list, SMB_ACL_TYPE_ACCESS, f);
if (S_ISDIR(file->mode))
F_ACL(file) = recv_rsync_acl(&access_acl_list, SMB_ACL_TYPE_ACCESS, f);
if (S_ISDIR(file->mode))
- F_D
EF_
ACL(file) = recv_rsync_acl(&default_acl_list, SMB_ACL_TYPE_DEFAULT, f);
+ F_D
IR_DEF
ACL(file) = recv_rsync_acl(&default_acl_list, SMB_ACL_TYPE_DEFAULT, f);
}
static int cache_rsync_acl(rsync_acl *racl, SMB_ACL_TYPE_T type, item_list *racl_list)
}
static int cache_rsync_acl(rsync_acl *racl, SMB_ACL_TYPE_T type, item_list *racl_list)
@@
-762,15
+761,15
@@
static int cache_rsync_acl(rsync_acl *racl, SMB_ACL_TYPE_T type, item_list *racl
return ndx;
}
return ndx;
}
-/* Turn the ACL data in statx into cached ACL data, setting the index
+/* Turn the ACL data in stat
_
x into cached ACL data, setting the index
* values in the file struct. */
* values in the file struct. */
-void cache_acl(struct file_struct *file, statx *sxp)
+void cache_acl(struct file_struct *file, stat
_
x *sxp)
{
F_ACL(file) = cache_rsync_acl(sxp->acc_acl,
SMB_ACL_TYPE_ACCESS, &access_acl_list);
if (S_ISDIR(sxp->st.st_mode)) {
{
F_ACL(file) = cache_rsync_acl(sxp->acc_acl,
SMB_ACL_TYPE_ACCESS, &access_acl_list);
if (S_ISDIR(sxp->st.st_mode)) {
- F_D
EF_
ACL(file) = cache_rsync_acl(sxp->def_acl,
+ F_D
IR_DEF
ACL(file) = cache_rsync_acl(sxp->def_acl,
SMB_ACL_TYPE_DEFAULT, &default_acl_list);
}
}
SMB_ACL_TYPE_DEFAULT, &default_acl_list);
}
}
@@
-852,7
+851,7
@@
static mode_t change_sacl_perms(SMB_ACL_T sacl, rsync_acl *racl, mode_t old_mode
}
static int set_rsync_acl(const char *fname, acl_duo *duo_item,
}
static int set_rsync_acl(const char *fname, acl_duo *duo_item,
- SMB_ACL_TYPE_T type, statx *sxp, mode_t mode)
+ SMB_ACL_TYPE_T type, stat
_
x *sxp, mode_t mode)
{
if (type == SMB_ACL_TYPE_DEFAULT
&& duo_item->racl.user_obj == NO_ENTRY) {
{
if (type == SMB_ACL_TYPE_DEFAULT
&& duo_item->racl.user_obj == NO_ENTRY) {
@@
-892,7
+891,7
@@
static int set_rsync_acl(const char *fname, acl_duo *duo_item,
*
* Returns 1 for unchanged, 0 for changed, -1 for failed. Call this
* with fname set to NULL to just check if the ACL is unchanged. */
*
* Returns 1 for unchanged, 0 for changed, -1 for failed. Call this
* with fname set to NULL to just check if the ACL is unchanged. */
-int set_acl(const char *fname, const struct file_struct *file, statx *sxp)
+int set_acl(const char *fname, const struct file_struct *file, stat
_
x *sxp)
{
int unchanged = 1;
int32 ndx;
{
int unchanged = 1;
int32 ndx;
@@
-921,7
+920,7
@@
int set_acl(const char *fname, const struct file_struct *file, statx *sxp)
if (!S_ISDIR(sxp->st.st_mode))
return unchanged;
if (!S_ISDIR(sxp->st.st_mode))
return unchanged;
- ndx = F_D
EF_
ACL(file);
+ ndx = F_D
IR_DEF
ACL(file);
if (ndx >= 0 && (size_t)ndx < default_acl_list.count) {
acl_duo *duo_item = default_acl_list.items;
duo_item += ndx;
if (ndx >= 0 && (size_t)ndx < default_acl_list.count) {
acl_duo *duo_item = default_acl_list.items;
duo_item += ndx;