added FULL_EA_INFORMATION setea call
authorAndrew Tridgell <tridge@samba.org>
Tue, 23 Sep 2008 06:45:10 +0000 (16:45 +1000)
committerAndrew Tridgell <tridge@samba.org>
Tue, 23 Sep 2008 06:45:10 +0000 (16:45 +1000)
source4/libcli/raw/interfaces.h
source4/libcli/raw/rawsetfileinfo.c

index 537041c13762833287f946748fe08ea8e0386247..20ed4414350487a0c7a009a36de55de3a8ece8d6 100644 (file)
@@ -1112,6 +1112,15 @@ union smb_setfileinfo {
                        struct security_descriptor *sd;
                } in;
        } set_secdesc;
+
+       /* RAW_SFILEINFO_FULL_EA_INFORMATION */
+       struct {
+               enum smb_setfileinfo_level level;
+               struct {
+                       union smb_handle_or_path file;
+                       struct smb_ea_list eas;
+               } in;
+       } full_ea_information;
 };
 
 
index 5a4706778a4a0e2b586a634cda87c231f54d0504..f7dfb933f190760f27ee3fe445c77ffc2cc75aaf 100644 (file)
@@ -37,7 +37,7 @@ bool smb_raw_setfileinfo_passthru(TALLOC_CTX *mem_ctx,
 
 #define NEED_BLOB(n) do { \
          *blob = data_blob_talloc(mem_ctx, NULL, n); \
-         if (blob->data == NULL) return false; \
+         if (blob->data == NULL && n != 0) return false; \
         } while (0)
 
        switch (level) {
@@ -109,6 +109,16 @@ bool smb_raw_setfileinfo_passthru(TALLOC_CTX *mem_ctx,
                return true;
        }
 
+       case RAW_SFILEINFO_FULL_EA_INFORMATION:
+               printf("num_eas=%d\n", parms->full_ea_information.in.eas.num_eas);
+               NEED_BLOB(ea_list_size_chained(
+                                 parms->full_ea_information.in.eas.num_eas,
+                                 parms->full_ea_information.in.eas.eas, 4));
+               ea_put_list_chained(blob->data, 
+                                   parms->full_ea_information.in.eas.num_eas,
+                                   parms->full_ea_information.in.eas.eas, 4);
+               return true;
+
                /* Unhandled levels */
        case RAW_SFILEINFO_PIPE_INFORMATION:
        case RAW_SFILEINFO_VALID_DATA_INFORMATION: