/*
- $Id: acls.c,v 1.5 2009-10-15 10:43:13 didg Exp $
+ $Id: acls.c,v 1.6 2009-11-26 18:17:12 franklahm Exp $
Copyright (c) 2008,2009 Frank Lahm <franklahm@gmail.com>
This program is free software; you can redistribute it and/or modify
#include <atalk/cnid.h>
#include <atalk/logger.h>
#include <atalk/uuid.h>
+#include <atalk/acl.h>
#include "directory.h"
#include "desktop.h"
int ret;
/* Ressource etc. first */
- if ((ret = vol->vfs->rf_remove_acl(vol, path, dir)) != AFP_OK)
+ if ((ret = vol->vfs->vfs_remove_acl(vol, path, dir)) != AFP_OK)
return ret;
/* now the data fork or dir */
return (remove_acl(path));
/* Ressourcefork first.
Note: for dirs we set the same ACL on the .AppleDouble/.Parent _file_. This
might be strange for ACE_DELETE_CHILD and for inheritance flags. */
- if ( (ret = vol->vfs->rf_acl(vol, name, ACE_SETACL, new_aces_count, new_aces)) != 0) {
+ if ( (ret = vol->vfs->vfs_acl(vol, name, ACE_SETACL, new_aces_count, new_aces)) != 0) {
LOG(log_error, logtype_afpd, "set_acl: error setting acl: %s", strerror(errno));
if (errno == (EACCES | EPERM))
ret = AFPERR_ACCESS;
/*
- * $Id: directory.c,v 1.119 2009-11-19 10:41:23 franklahm Exp $
+ * $Id: directory.c,v 1.120 2009-11-26 18:17:12 franklahm Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
if ((afp_version < 32) || !(obj->options.flags & OPTION_UUID ))
return AFPERR_PARAM;
LOG(log_debug, logtype_afpd, "afp_mapid: valid UUID request");
+ uuidtype_t type;
len = getnamefromuuid( ibuf, &name, &type);
if (len != 0) /* its a error code, not len */
return AFPERR_NOITEM;
/*
- $Id: acl.c,v 1.1 2009-10-02 09:32:41 franklahm Exp $
+ $Id: acl.c,v 1.2 2009-11-26 18:17:12 franklahm Exp $
Copyright (c) 2009 Frank Lahm <franklahm@gmail.com>
This program is free software; you can redistribute it and/or modify
#include "config.h"
#endif /* HAVE_CONFIG_H */
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
#include <errno.h>
#include <sys/acl.h>
+#include <atalk/afp.h>
#include <atalk/util.h>
#include <atalk/logger.h>
if ((acl(buf, cmd, count, aces)) != 0)
return -1;
/* now set ACL on ressource fork */
- if ((acl(vol->vfs->ad_path(path, ADFLAGS_DIR), cmd, count, aces)) != 0)
+ if ((acl(vol->ad_path(path, ADFLAGS_DIR), cmd, count, aces)) != 0)
return -1;
} else
/* set ACL on ressource fork */
- if ((acl(vol->vfs->ad_path(path, ADFLAGS_HF), cmd, count, aces)) != 0)
+ if ((acl(vol->ad_path(path, ADFLAGS_HF), cmd, count, aces)) != 0)
return -1;
return 0;
if (len < 0 || len >= MAXPATHLEN)
return AFPERR_MISC;
/* remove ACL from .AppleDouble/.Parent first */
- if ((ret = remove_acl(vol->vfs->ad_path(path, ADFLAGS_DIR))) != AFP_OK)
+ if ((ret = remove_acl(vol->ad_path(path, ADFLAGS_DIR))) != AFP_OK)
return ret;
/* now remove from .AppleDouble dir */
if ((ret = remove_acl(buf)) != AFP_OK)
return ret;
} else
/* remove ACL from ressource fork */
- if ((ret = remove_acl(vol->vfs->ad_path(path, ADFLAGS_HF))) != AFP_OK)
+ if ((ret = remove_acl(vol->ad_path(path, ADFLAGS_HF))) != AFP_OK)
return ret;
return AFP_OK;
/* rf_renamefile: */ NULL,
/* vfs_copyfile */ NULL,
/* rf_acl: */ RF_solaris_acl,
- /* rf_remove_acl */ RF_remove_acl,
+ /* rf_remove_acl */ RF_solaris_remove_acl,
NULL
};
#endif