2 Copyright (c) 2004 Didier Gautheron
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.
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.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 #endif /* HAVE_CONFIG_H */
28 #ifdef HAVE_NFSv4_ACLS
32 #include <atalk/adouble.h>
33 #include <atalk/volume.h>
36 /* low level adouble fn */
37 char *(*ad_path)(const char *, int);
40 int (*validupath)(const struct vol *, const char *);
41 int (*rf_chown)(const struct vol *, const char *path, uid_t owner, gid_t group);
42 int (*rf_renamedir)(const struct vol *, const char *oldpath, const char *newpath);
43 int (*rf_deletecurdir)(const struct vol *);
44 int (*rf_setfilmode)(const struct vol *, const char * name, mode_t mode, struct stat *st);
45 int (*rf_setdirmode)(const struct vol *, const char * name, mode_t mode, struct stat *st);
46 int (*rf_setdirunixmode)(const struct vol *, const char * name, mode_t mode, struct stat *st);
48 int (*rf_setdirowner)(const struct vol *, const char *path, uid_t owner, gid_t group);
50 int (*rf_deletefile)(const struct vol *, const char * );
51 int (*rf_renamefile)(const struct vol *, const char *oldpath, const char *newpath);
52 #ifdef HAVE_NFSv4_ACLS
53 int (*rf_acl)(const struct vol *, const char *path, int cmd, int count, ace_t *aces);
54 int (*rf_remove_acl)(const struct vol *, const char *path, int dir);
57 /* Extended Attributes */
58 int (*get_easize)(const struct vol * restrict, char * restrict rbuf, int * restrict rbuflen, const char * restrict uname, int oflag, const char * restrict attruname);
59 int (*get_eacontent)(const struct vol * restrict , char * restrict rbuf, int * restrict rbuflen, const char * restrict uname, int oflag, const char * restrict attruname, int maxreply);
60 int (*list_eas)(const struct vol * restrict , char * restrict attrnamebuf, int * restrict buflen, const char * restrict uname, int oflag);
61 int (*set_ea)(const struct vol * restrict , const char * restrict uname, const char * restrict attruname, const char * restrict ibuf, size_t attrsize, int oflag);
62 int (*remove_ea)(const struct vol * restrict , const char * restrict uname, const char * restrict attruname, int oflag);
65 extern void initvol_vfs(struct vol * restrict vol);
67 /* VFS inderected funcs ... : */
68 /* ...default adouble EAs */
69 extern int get_easize(const struct vol * restrict vol, char * restrict rbuf, int * restrict rbuflen, const char * restrict uname, int oflag, const char * restrict attruname);
70 extern int get_eacontent(const struct vol * restrict vol, char * restrict rbuf, int * restrict rbuflen, const char * restrict uname, int oflag, const char * restrict attruname, int maxreply);
71 extern int list_eas(const struct vol * restrict vol, char * restrict attrnamebuf, int * restrict buflen, const char * restrict uname, int oflag);
72 extern int set_ea(const struct vol * restrict vol, const char * restrict uname, const char * restrict attruname, const char * restrict ibuf, size_t attrsize, int oflag);
73 extern int remove_ea(const struct vol * restrict vol, const char * restrict uname, const char * restrict attruname, int oflag);
75 /* ... Solaris native EAs */
76 #ifdef HAVE_SOLARIS_EAS
77 extern int sol_get_easize(const struct vol * restrict vol, char * restrict rbuf, int * restrict rbuflen, const char * restrict uname, int oflag, const char * restrict attruname);
78 extern int sol_get_eacontent(const struct vol * restrict vol, char * restrict rbuf, int * restrict rbuflen, const char * restrict uname, int oflag, char * restrict attruname, int maxreply);
79 extern int sol_list_eas(const struct vol * restrict vol, char * restrict attrnamebuf, int * restrict buflen, const char * restrict uname, int oflag);
80 extern int sol_set_ea(const struct vol * restrict vol, const char * restrict uname, const char * restrict attruname, const char * restrict ibuf,size_t attrsize, int oflag);
81 extern int sol_remove_ea(const struct vol * restrict vol, const char * restrict uname, const char * restrict attruname, int oflag);
82 #endif /* HAVE_SOLARIS_EAS */
84 /* Solaris NFSv4 ACL stuff */
85 #ifdef HAVE_NFSv4_ACLS
86 extern int get_nfsv4_acl(const char *name, ace_t **retAces);
87 extern int remove_acl(const char *name);
88 #endif /* HAVE_NFSv4_ACLS */
90 #endif /* ATALK_VFS_H */