]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/acls.c
acltoownermode: check if UUID support is on
[netatalk.git] / etc / afpd / acls.c
index f5d3eaab1bebf841d01caefef0ef823b29ea4513..fd6f3ab4cea3f1114a9061668f4636dccad255df 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  $Id: acls.c,v 1.8 2010-02-10 14:05:37 franklahm Exp $
+  $Id: acls.c,v 1.9 2010-03-08 19:49:59 franklahm Exp $
   Copyright (c) 2008,2009 Frank Lahm <franklahm@gmail.com>
 
   This program is free software; you can redistribute it and/or modify
@@ -961,6 +961,11 @@ void acltoownermode(char *path, struct stat *st, uid_t uid, struct maccess *ma)
     uuid_t uuid;
     int dir, r_ok, w_ok, x_ok;
 
+    if ( ! (AFPobj->options.flags & OPTION_UUID))
+        return;
+
+    LOG(log_maxdebug, logtype_afpd, "acltoownermode('%s')", path);
+
     if ((pw = getpwuid(uid)) == NULL) {
         LOG(log_error, logtype_afpd, "acltoownermode: %s", strerror(errno));
         return;