s4:kdc: Implement KDC plugin hardware authentication policy
[samba.git] / source3 / modules / vfs_streams_depot.c
index 08c3114771cee96f30177f2ea0a4d68d347f787f..1221b2c2be220d2c28c92d5b9aa9c8dd9dee7104 100644 (file)
@@ -20,6 +20,7 @@
 #include "includes.h"
 #include "smbd/smbd.h"
 #include "system/filesys.h"
+#include "source3/smbd/dir.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_VFS
@@ -214,7 +215,7 @@ static char *stream_dir(vfs_handle_struct *handle,
 
        id = SMB_VFS_FILE_ID_CREATE(handle->conn, &base_sbuf_tmp);
 
-       push_file_id_16((char *)id_buf, &id);
+       push_file_id_16(id_buf, &id);
 
        hash = hash_fn(data_blob_const(id_buf, sizeof(id_buf)));
 
@@ -466,7 +467,7 @@ static NTSTATUS stream_smb_fname(vfs_handle_struct *handle,
                        goto fail;
                }
        } else {
-               /* Normalize the stream type to upercase. */
+               /* Normalize the stream type to uppercase. */
                if (!strupper_m(strrchr_m(stream_fname, ':') + 1)) {
                        status = NT_STATUS_INVALID_PARAMETER;
                        goto fail;
@@ -563,9 +564,7 @@ static NTSTATUS walk_streams(vfs_handle_struct *handle,
                return status;
        }
 
-        while ((dname = ReadDirName(dir_hnd, NULL, &talloced))
-              != NULL)
-       {
+       while ((dname = ReadDirName(dir_hnd, &talloced)) != NULL) {
                if (ISDOT(dname) || ISDOTDOT(dname)) {
                        TALLOC_FREE(talloced);
                        continue;
@@ -727,7 +726,7 @@ static int streams_depot_openat(struct vfs_handle_struct *handle,
                        if (ret == -1) {
                                DBG_DEBUG("FSETXATTR failed: %s\n",
                                          strerror(errno));
-                               return -1;
+                               goto done;
                        }
                }
        }