#include <errno.h>
#include <grp.h>
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <bstrlib.h>
#include <atalk/acl.h>
#include <atalk/adouble.h>
#include <atalk/afp.h>
#include <atalk/cnid.h>
#include <atalk/errchk.h>
#include <atalk/logger.h>
#include <atalk/netatalk_conf.h>
#include <atalk/unix.h>
#include <atalk/util.h>
#include <atalk/uuid.h>
#include <atalk/vfs.h>
#include "acl_mappings.h"
#include "acls.h"
#include "auth.h"
#include "desktop.h"
#include "directory.h"
#include "fork.h"
#include "unix.h"
#include "volume.h"
Macros | |
#define | SOLARIS_2_DARWIN 1 |
#define | DARWIN_2_SOLARIS 2 |
#define | POSIX_DEFAULT_2_DARWIN 3 |
#define | POSIX_ACCESS_2_DARWIN 4 |
#define | DARWIN_2_POSIX_DEFAULT 5 |
#define | DARWIN_2_POSIX_ACCESS 6 |
#define | MAP_MASK 31 |
#define | IS_DIR 32 |
#define | HAS_DEFAULT_ACL 0x01 |
#define | HAS_EXT_DEFAULT_ACL 0x02 |
Functions | |
static int | map_acl (int type, void *acl, darwin_ace_t *buf, int ace_count) |
static int | get_and_map_acl (char *name, char *rbuf, size_t *rbuflen) |
static int | remove_acl (const struct vol *vol, const char *path, int dir) |
static int | check_acl_access (const AFPObj *obj, const struct vol *vol, struct dir *dir, const char *path, const uuidp_t uuid, uint32_t requested_rights) |
int | afp_access (AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf _U_, size_t *rbuflen) |
int | afp_getacl (AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf _U_, size_t *rbuflen) |
int | afp_setacl (AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf _U_, size_t *rbuflen) |
int | acltoownermode (const AFPObj *obj, const struct vol *vol, char *path, struct stat *st, struct maccess *ma) |
#define DARWIN_2_POSIX_ACCESS 6 |
#define DARWIN_2_POSIX_DEFAULT 5 |
#define DARWIN_2_SOLARIS 2 |
#define HAS_DEFAULT_ACL 0x01 |
#define HAS_EXT_DEFAULT_ACL 0x02 |
#define IS_DIR 32 |
#define MAP_MASK 31 |
#define POSIX_ACCESS_2_DARWIN 4 |
#define POSIX_DEFAULT_2_DARWIN 3 |
#define SOLARIS_2_DARWIN 1 |
int acltoownermode | ( | const AFPObj * | obj, |
const struct vol * | vol, | ||
char * | path, | ||
struct stat * | st, | ||
struct maccess * | ma ) |
map ACL to user maccess
This is the magic function that makes ACLs usable by calculating the access granted by ACEs to the logged in user.
|
static |
Checks if a given UUID has requested_rights(type darwin_ace_rights) for path.
Note: this gets called frequently and is a good place for optimizations !
obj | (r) AFP object |
vol | (r) volume |
dir | (rw) directory |
path | (r) path to filesystem object |
uuid | (r) UUID of user |
requested_rights | (r) requested Darwin ACE |
|
static |
|
static |
|
static |