Add accessor functions to set a bool "priv" on a directory handle. Not yet used,...
authorJeremy Allison <jra@samba.org>
Wed, 29 Feb 2012 19:42:21 +0000 (11:42 -0800)
committerJeremy Allison <jra@samba.org>
Thu, 1 Mar 2012 01:04:39 +0000 (17:04 -0800)
source3/smbd/dir.c
source3/smbd/proto.h

index d4faf42fe02e99abeda68b880cb3fab5ec0cfff2..c1a850ed3270a709aedd4e17c946fd9d29a3173b 100644 (file)
@@ -64,6 +64,7 @@ struct dptr_struct {
        char *path;
        bool has_wild; /* Set to true if the wcard entry has MS wildcard characters in it. */
        bool did_stat; /* Optimisation for non-wcard searches. */
+       bool priv;     /* Directory handle opened with privilege. */
 };
 
 static struct smb_Dir *OpenDir_fsp(TALLOC_CTX *mem_ctx, connection_struct *conn,
@@ -647,6 +648,16 @@ int dptr_dnum(struct dptr_struct *dptr)
        return dptr->dnum;
 }
 
+bool dptr_get_priv(struct dptr_struct *dptr)
+{
+       return dptr->priv;
+}
+
+void dptr_set_priv(struct dptr_struct *dptr)
+{
+       dptr->priv = true;
+}
+
 /****************************************************************************
  Return the next visible file name, skipping veto'd and invisible files.
 ****************************************************************************/
index 48ecfe52d59934a204da33d3f560776c7ab6002f..9a1e9cd6839d35ae77a57228681464afc7d5a4b8 100644 (file)
@@ -205,6 +205,8 @@ void dptr_SeekDir(struct dptr_struct *dptr, long offset);
 long dptr_TellDir(struct dptr_struct *dptr);
 bool dptr_has_wild(struct dptr_struct *dptr);
 int dptr_dnum(struct dptr_struct *dptr);
+bool dptr_get_priv(struct dptr_struct *dptr);
+void dptr_set_priv(struct dptr_struct *dptr);
 char *dptr_ReadDirName(TALLOC_CTX *ctx,
                        struct dptr_struct *dptr,
                        long *poffset,