netatalk
4.4.3
Free and Open Source Apple Filing Protocol (AFP) Server
Toggle main menu visibility
Loading...
Searching...
No Matches
acl.h
Go to the documentation of this file.
1
/*
2
Copyright (c) 2009 Frank Lahm <franklahm@gmail.com>
3
4
This program is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation; either version 2 of the License, or
7
(at your option) any later version.
8
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
13
*/
14
15
#ifndef ATALK_ACL_H
16
#define ATALK_ACL_H
17
18
#ifdef HAVE_CONFIG_H
19
#include "
config.h
"
20
#endif
/* HAVE_CONFIG_H */
21
22
#ifdef HAVE_ACLS
23
24
#define O_NETATALK_ACL (O_NOFOLLOW << 1)
25
#define O_IGNORE (O_NOFOLLOW << 2)
26
27
#ifdef HAVE_SOLARIS_ACLS
28
#include <sys/acl.h>
29
#endif
30
31
#ifdef HAVE_FREEBSD_SUNACL
32
#include <sunacl.h>
33
#endif
34
35
#ifdef HAVE_NFSV4_ACLS
36
37
#define chmod_acl nfsv4_chmod
38
39
extern
int
get_nfsv4_acl
(
const
char
*name, ace_t **retAces);
40
extern
int
remove_nfsv4_acl_vfs
(
const
char
*name);
41
extern
int
strip_trivial_aces
(ace_t **saces,
int
sacecount);
42
extern
int
strip_nontrivial_aces
(ace_t **saces,
int
sacecount);
43
extern
ace_t *
concat_aces
(ace_t *aces1,
int
ace1count, ace_t *aces2,
44
int
ace2count);
45
extern
int
nfsv4_chmod
(
char
*name, mode_t mode);
46
47
#endif
/* HAVE_NFSV4_ACLS */
48
49
#ifdef HAVE_POSIX_ACLS
50
#include <sys/types.h>
51
#include <sys/stat.h>
52
#include <sys/acl.h>
53
54
#define chmod_acl posix_chmod
55
#define fchmod_acl posix_fchmod
56
57
extern
int
remove_posix_acl_vfs
(
const
char
*name);
58
extern
int
posix_chmod
(
const
char
*name, mode_t mode);
59
extern
int
posix_fchmod
(
int
fd, mode_t mode);
60
61
#endif
/* HAVE_POSIX_ACLS */
62
63
#else
/* HAVE_ACLS=no */
64
65
#define O_NETATALK_ACL 0
66
#define O_IGNORE 0
67
#define chmod_acl chmod
68
69
#endif
/* HAVE_ACLS */
70
71
#endif
/* ATALK_ACL_H */
get_nfsv4_acl
int get_nfsv4_acl(const char *name, ace_t **retAces)
Get ACL.
Definition
libatalk/acl/unix.c:45
posix_chmod
int posix_chmod(const char *name, mode_t mode)
POSIX ACL chmod.
Definition
libatalk/acl/unix.c:341
nfsv4_chmod
int nfsv4_chmod(char *name, mode_t mode)
Change mode of file preserving existing explicit ACEs.
Definition
libatalk/acl/unix.c:242
strip_trivial_aces
int strip_trivial_aces(ace_t **saces, int sacecount)
Remove any trivial ACE "in-place".
Definition
libatalk/acl/unix.c:139
concat_aces
ace_t * concat_aces(ace_t *aces1, int ace1count, ace_t *aces2, int ace2count)
Definition
libatalk/acl/unix.c:106
posix_fchmod
int posix_fchmod(int fd, mode_t mode)
POSIX ACL fchmod.
Definition
libatalk/acl/unix.c:469
remove_posix_acl_vfs
int remove_posix_acl_vfs(const char *name)
Remove any ACL_USER, ACL_GROUP, ACL_MASK or ACL_TYPE_DEFAULT ACEs from an object.
Definition
acl.c:108
remove_nfsv4_acl_vfs
int remove_nfsv4_acl_vfs(const char *name)
Removes all non-trivial ACLs from object.
Definition
acl.c:39
strip_nontrivial_aces
int strip_nontrivial_aces(ace_t **saces, int sacecount)
Remove non-trivial ACEs "in-place".
Definition
libatalk/acl/unix.c:186
config.h
include
atalk
acl.h
Generated by
1.17.0