r4214: possibly fix the "no-EAs" bug from OS/2
authorAndrew Tridgell <tridge@samba.org>
Wed, 15 Dec 2004 03:53:05 +0000 (03:53 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:07:27 +0000 (13:07 -0500)
(This used to be commit c9871253485b1a663fc79649742d3a89e81eb6d4)

source4/smb_server/trans2.c

index c3768d6ee02bb571320d2922687f2e9bc01c73a5..b75c8eb71a9900d555d94e5c15d04d505f3015ba 100644 (file)
@@ -512,6 +512,7 @@ static NTSTATUS trans2_fileinfo_fill(struct smbsrv_request *req, struct smb_tran
                                     union smb_fileinfo *st)
 {
        uint_t i;
                                     union smb_fileinfo *st)
 {
        uint_t i;
+       uint32_t list_size;
        
        switch (st->generic.level) {
        case RAW_FILEINFO_GENERIC:
        
        switch (st->generic.level) {
        case RAW_FILEINFO_GENERIC:
@@ -613,18 +614,12 @@ static NTSTATUS trans2_fileinfo_fill(struct smbsrv_request *req, struct smb_tran
                return NT_STATUS_OK;
 
        case RAW_FILEINFO_ALL_EAS:
                return NT_STATUS_OK;
 
        case RAW_FILEINFO_ALL_EAS:
-               if (st->all_eas.out.num_eas == 0) {
-                       trans2_setup_reply(req, trans, 2, 4, 0);
-                       SSVAL(trans->out.params.data, 0, 0);
-                       SIVAL(trans->out.data.data,  0, 0);
-               } else {
-                       uint32_t list_size = ea_list_size(st->all_eas.out.num_eas,
+               list_size = ea_list_size(st->all_eas.out.num_eas,
                                                        st->all_eas.out.eas);
                        trans2_setup_reply(req, trans, 2, list_size, 0);
                        SSVAL(trans->out.params.data, 0, 0);
                        ea_put_list(trans->out.data.data, 
                                    st->all_eas.out.num_eas, st->all_eas.out.eas);
                                                        st->all_eas.out.eas);
                        trans2_setup_reply(req, trans, 2, list_size, 0);
                        SSVAL(trans->out.params.data, 0, 0);
                        ea_put_list(trans->out.data.data, 
                                    st->all_eas.out.num_eas, st->all_eas.out.eas);
-               }
                return NT_STATUS_OK;
 
        case RAW_FILEINFO_ACCESS_INFORMATION:
                return NT_STATUS_OK;
 
        case RAW_FILEINFO_ACCESS_INFORMATION: