]> arthur.barton.de Git - netatalk.git/blobdiff - include/atalk/adouble.h
Allow opening symlinks r/w, but don't actually allow writing. Fixes test426
[netatalk.git] / include / atalk / adouble.h
index 0c420d041432ec748331c3c9b7feadefea71a82c..b47464ef55106142e3443e29b21ee1b7a08c87f7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: adouble.h,v 1.51 2010-01-04 13:49:48 franklahm Exp $
+ * $Id: adouble.h,v 1.55 2010-03-30 12:55:26 franklahm Exp $
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
  * All Rights Reserved.
  *
@@ -243,12 +243,13 @@ typedef struct adf_lock_t {
 } adf_lock_t;
 
 struct ad_fd {
-    int          adf_fd;
+    int          adf_fd;        /* -1: invalid, -2: symlink */
 
 #ifndef HAVE_PREAD
     off_t        adf_off;
 #endif
 
+    char         *adf_syml;
     int          adf_flags;
     int          adf_excl;
     adf_lock_t   *adf_lock;
@@ -300,7 +301,9 @@ struct adouble_fops {
 #define ADFLAGS_DF        (1<<0)
 #define ADFLAGS_HF        (1<<1)
 #define ADFLAGS_DIR       (1<<2)
+/*
 #define ADFLAGS_NOADOUBLE (1<<3)
+*/
 #define ADFLAGS_V1COMPAT  (1<<4)
 #define ADFLAGS_NOHF      (1<<5)  /* not an error if no ressource fork */
 #define ADFLAGS_RDONLY    (1<<6)  /* don't try readwrite */
@@ -312,10 +315,9 @@ struct adouble_fops {
 /* adouble v2 cnid cache */
 #define ADVOL_NODEV      (1 << 0)
 #define ADVOL_CACHE      (1 << 1)
-/* adouble unix priv */
-#define ADVOL_UNIXPRIV   (1 << 2)
-/* dot files (.DS_Store) are invisible) */
-#define ADVOL_INVDOTS    (1 << 3)
+#define ADVOL_UNIXPRIV   (1 << 2) /* adouble unix priv */
+#define ADVOL_INVDOTS    (1 << 3) /* dot files (.DS_Store) are invisible) */
+#define ADVOL_NOADOUBLE  (1 << 4)
 
 /* lock flags */
 #define ADLOCK_CLR      (0)
@@ -472,9 +474,11 @@ extern int ad_mode        (const char *, int);
 extern int ad_mkdir       (const char *, int);
 extern void ad_init       (struct adouble *, int, int );
 extern int ad_open        (const char *, int, int, int, struct adouble *);
+extern int ad_openat      (int dirfd, const char *, int, int, int, struct adouble *);
 extern int ad_refresh     (struct adouble *);
 extern int ad_stat        (const char *, struct stat *);
 extern int ad_metadata    (const char *, int, struct adouble *);
+extern int ad_metadataat  (int, const char *, int, struct adouble *);
 
 #define ad_open_metadata(name, flags, mode, adp)\
    ad_open(name, ADFLAGS_MD|(flags), O_RDWR |(mode), 0666, (adp))