X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/a30dcbc0a8850f63fe831e9f38259347ac4aaa7c..8e41b68e8f975c02a5d9281be780ba5d1a385107:/lib/sysacls.c diff --git a/lib/sysacls.c b/lib/sysacls.c index ac4909d7..27d1b271 100644 --- a/lib/sysacls.c +++ b/lib/sysacls.c @@ -1,25 +1,24 @@ -/* - Unix SMB/CIFS implementation. - Based on the Samba ACL support code. - Copyright (C) Jeremy Allison 2000. - - The permission functions have been changed to get/set all bits via - one call. Some functions that rsync doesn't need were also removed. - - 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 - the Free Software Foundation; either version 2 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 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - 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., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ +/* + * Unix SMB/CIFS implementation. + * Based on the Samba ACL support code. + * Copyright (C) Jeremy Allison 2000. + * + * The permission functions have been changed to get/set all bits via + * one call. Some functions that rsync doesn't need were also removed. + * + * 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 + * 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 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * with this program; if not, visit the http://fsf.org website. + */ #include "rsync.h" #include "sysacls.h" @@ -279,7 +278,6 @@ int sys_acl_set_access_bits(SMB_ACL_ENTRY_T entry, uint32 bits) int rc; if ((rc = acl_get_permset(entry, &permset)) != 0) return rc; - acl_clear_perms(permset); *permset = bits & 7; return acl_set_permset(entry, permset); } @@ -538,7 +536,7 @@ SMB_ACL_T sys_acl_get_fd(int fd) int sys_acl_get_access_bits(SMB_ACL_ENTRY_T entry_d, uint32 *bits) { - *bits = &entry_d->a_perm; + *bits = entry_d->a_perm; return 0; } @@ -1021,7 +1019,7 @@ SMB_ACL_T sys_acl_get_fd(int fd) int sys_acl_get_access_bits(SMB_ACL_ENTRY_T entry_d, uint32 *bits) { - *bits = &entry_d->a_perm; + *bits = entry_d->a_perm; return 0; }