#include <atalk/unix.h>
#include <atalk/compat.h>
#include <atalk/errchk.h>
+#include <atalk/acl.h>
/* close all FDs >= a specified value */
static void closeall(int fd)
* Options description:
* O_NOFOLLOW: don't chmod() symlinks, do nothing, return 0
* O_NETATALK_ACL: call chmod_acl() instead of chmod()
+ * O_IGNORE: ignore chmod() request, directly return 0
*/
int ochmod(char *path, mode_t mode, const struct stat *st, int options)
{
struct stat sb;
+ if (options & O_IGNORE)
+ return 0;
+
if (!st) {
if (lstat(path, &sb) != 0)
return -1;
#ifdef REALPATH_TAKES_NULL
if ((resolved_path = realpath(path, NULL)) == NULL) {
- LOG(log_error, logtype_afpd, "realpath() cannot resolve path \"%s\"", path);
+ LOG(log_debug, logtype_afpd, "realpath() cannot resolve path \"%s\"", path);
return NULL;
}
return resolved_path;
return NULL;
if (realpath(path, resolved_path) == NULL) {
free(resolved_path);
- LOG(log_error, logtype_afpd, "realpath() cannot resolve path \"%s\"", path);
+ LOG(log_debug, logtype_afpd, "realpath() cannot resolve path \"%s\"", path);
return NULL;
}
/* Safe some memory */