Ignore:
Timestamp:
Nov 27, 2012, 4:56:06 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated vendor to 3.6.9

Location:
vendor/current/source3/modules
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source3/modules/gpfs.c

    r740 r746  
    1919
    2020#include "includes.h"
     21#include "system/filesys.h"
    2122#include "smbd/smbd.h"
    2223
  • vendor/current/source3/modules/nfs4_acls.c

    r740 r746  
    336336                      ace->aceFlags, win_ace_flags));
    337337
     338                mask = ace->aceMask;
    338339                /* Windows clients expect SYNC on acls to
    339340                   correctly allow rename. See bug #7909. */
    340                 mask = ace->aceMask | SMB_ACE4_SYNCHRONIZE;
     341                /* But not on DENY ace entries. See
     342                   bug #8442. */
     343                if(ace->aceType == SMB_ACE4_ACCESS_ALLOWED_ACE_TYPE) {
     344                        mask = ace->aceMask | SMB_ACE4_SYNCHRONIZE;
     345                }
    341346                init_sec_ace(&nt_ace_list[good_aces++], &sid,
    342347                        ace->aceType, mask,
  • vendor/current/source3/modules/onefs_streams.c

    r740 r746  
    737737        }
    738738
    739         state.streams = NULL;
    740         state.num_streams = 0;
     739        state.streams = *pstreams;
     740        state.num_streams = *pnum_streams;
    741741
    742742        if (lp_parm_bool(SNUM(handle->conn), PARM_ONEFS_TYPE,
     
    745745        }
    746746
    747         /* Add the default stream. */
    748         if (S_ISREG(sbuf.st_ex_mode)) {
    749                 if (!add_one_stream(mem_ctx,
    750                                     &state.num_streams, &state.streams,
    751                                     "", sbuf.st_ex_size,
    752                                     SMB_VFS_GET_ALLOC_SIZE(handle->conn, fsp,
    753                                                            &sbuf))) {
    754                         return NT_STATUS_NO_MEMORY;
    755                 }
    756         }
    757 
    758747        state.mem_ctx = mem_ctx;
    759748        state.handle = handle;
     
    779768        *num_streams = state.num_streams;
    780769        *streams = state.streams;
    781         return NT_STATUS_OK;
    782 }
     770        return SMB_VFS_NEXT_STREAMINFO(handle, fsp, fname, mem_ctx, pnum_streams, pstreams);
     771}
  • vendor/current/source3/modules/vfs_acl_common.c

    r740 r746  
    167167*******************************************************************/
    168168
    169 static void add_directory_inheritable_components(vfs_handle_struct *handle,
     169static NTSTATUS add_directory_inheritable_components(vfs_handle_struct *handle,
    170170                                const char *name,
    171171                                SMB_STRUCT_STAT *psbuf,
     
    185185
    186186        if (new_ace_list == NULL) {
    187                 return;
     187                return NT_STATUS_NO_MEMORY;
    188188        }
    189189
     
    237237                                SEC_ACE_FLAG_OBJECT_INHERIT|
    238238                                SEC_ACE_FLAG_INHERIT_ONLY);
    239         psd->dacl->aces = new_ace_list;
    240         psd->dacl->num_aces += 3;
     239        if (psd->dacl) {
     240                psd->dacl->aces = new_ace_list;
     241                psd->dacl->num_aces += 3;
     242        } else {
     243                psd->dacl = make_sec_acl(talloc_tos(),
     244                                NT4_ACL_REVISION,
     245                                3,
     246                                new_ace_list);
     247                if (psd->dacl == NULL) {
     248                        return NT_STATUS_NO_MEMORY;
     249                }
     250        }
     251        return NT_STATUS_OK;
    241252}
    242253
     
    253264                                struct security_descriptor **ppdesc)
    254265{
    255         DATA_BLOB blob;
     266        DATA_BLOB blob = data_blob_null;
    256267        NTSTATUS status;
    257268        uint16_t hash_type = XATTR_SD_HASH_TYPE_NONE;
     
    379390                        }
    380391                }
    381                 is_directory = S_ISDIR(sbuf.st_ex_mode);
     392                is_directory = S_ISDIR(psbuf->st_ex_mode);
    382393
    383394                if (ignore_file_system_acl) {
     
    394405                                !sd_has_inheritable_components(psd,
    395406                                                        true)) {
    396                                 add_directory_inheritable_components(handle,
     407                                status = add_directory_inheritable_components(
     408                                                        handle,
    397409                                                        name,
    398410                                                        psbuf,
    399411                                                        psd);
     412                                if (!NT_STATUS_IS_OK(status)) {
     413                                        return status;
     414                                }
    400415                        }
    401416                        /* The underlying POSIX module always sets
     
    414429        }
    415430        if (!(security_info & SECINFO_DACL)) {
     431                psd->type &= ~SEC_DESC_DACL_PRESENT;
    416432                psd->dacl = NULL;
    417433        }
    418434        if (!(security_info & SECINFO_SACL)) {
     435                psd->type &= ~SEC_DESC_SACL_PRESENT;
    419436                psd->sacl = NULL;
    420437        }
     
    538555                                        (SECINFO_OWNER |
    539556                                         SECINFO_GROUP |
    540                                          SECINFO_DACL),
     557                                         SECINFO_DACL  |
     558                                         SECINFO_SACL),
    541559                                        pp_parent_desc);
    542560
     
    557575                                struct security_descriptor **pp_parent_desc)
    558576{
    559         char *parent_name = NULL;
    560577        struct security_descriptor *parent_desc = NULL;
    561578        uint32_t access_granted = 0;
     
    576593        if(!NT_STATUS_IS_OK(status)) {
    577594                DEBUG(10,("check_parent_acl_common: access check "
    578                         "on directory %s for "
     595                        "on parent directory of "
    579596                        "path %s for mask 0x%x returned %s\n",
    580                         parent_name,
    581597                        path,
    582598                        access_mask,
     
    621637                                (SECINFO_OWNER |
    622638                                 SECINFO_GROUP |
    623                                  SECINFO_DACL),
     639                                 SECINFO_DACL  |
     640                                 SECINFO_SACL),
    624641                                &pdesc);
    625642        if (NT_STATUS_IS_OK(status)) {
     
    632649                if (!NT_STATUS_IS_OK(status)) {
    633650                        DEBUG(10,("open_acl_xattr: %s open "
     651                                "for access 0x%x (0x%x) "
    634652                                "refused with error %s\n",
    635653                                fsp_str_dbg(fsp),
     654                                (unsigned int)fsp->access_mask,
     655                                (unsigned int)access_granted,
    636656                                nt_errstr(status) ));
    637657                        goto err;
     
    800820                        CONST_DISCARD(struct security_descriptor *,psd));
    801821        }
    802         create_acl_blob(psd, &blob, XATTR_SD_HASH_TYPE_SHA256, hash);
    803         store_acl_blob_fsp(handle, fsp, &blob);
    804 
    805         return NT_STATUS_OK;
     822        status = create_acl_blob(psd, &blob, XATTR_SD_HASH_TYPE_SHA256, hash);
     823        if (!NT_STATUS_IS_OK(status)) {
     824                DEBUG(10, ("fset_nt_acl_xattr: create_acl_blob failed\n"));
     825                return status;
     826        }
     827
     828        status = store_acl_blob_fsp(handle, fsp, &blob);
     829
     830        return status;
    806831}
    807832
     
    809834                        const char *fname, const char *mask, uint32 attr)
    810835{
    811         NTSTATUS status = check_parent_acl_common(handle, fname,
    812                                         SEC_DIR_LIST, NULL);
    813 
    814         if (!NT_STATUS_IS_OK(status)) {
     836        NTSTATUS status;
     837        uint32_t access_granted = 0;
     838        struct security_descriptor *sd = NULL;
     839
     840        status = get_nt_acl_internal(handle,
     841                                NULL,
     842                                fname,
     843                                (SECINFO_OWNER |
     844                                 SECINFO_GROUP |
     845                                 SECINFO_DACL  |
     846                                 SECINFO_SACL),
     847                                &sd);
     848        if (!NT_STATUS_IS_OK(status)) {
     849                DEBUG(10,("opendir_acl_common: "
     850                        "get_nt_acl_internal for dir %s "
     851                        "failed with error %s\n",
     852                        fname,
     853                        nt_errstr(status) ));
    815854                errno = map_errno_from_nt_status(status);
    816855                return NULL;
    817856        }
     857
     858        /* See if we can access it. */
     859        status = smb1_file_se_access_check(handle->conn,
     860                                sd,
     861                                get_current_nttok(handle->conn),
     862                                SEC_DIR_LIST,
     863                                &access_granted);
     864        if (!NT_STATUS_IS_OK(status)) {
     865                DEBUG(10,("opendir_acl_common: %s open "
     866                        "for access SEC_DIR_LIST "
     867                        "refused with error %s\n",
     868                        fname,
     869                        nt_errstr(status) ));
     870                errno = map_errno_from_nt_status(status);
     871                return NULL;
     872        }
     873
    818874        return SMB_VFS_NEXT_OPENDIR(handle, fname, mask, attr);
    819875}
     
    831887        struct smb_filename local_fname;
    832888        int saved_errno = 0;
     889        char *saved_dir = NULL;
     890
     891        saved_dir = vfs_GetWd(talloc_tos(),conn);
     892        if (!saved_dir) {
     893                saved_errno = errno;
     894                goto out;
     895        }
    833896
    834897        if (!parent_dirname(talloc_tos(), path,
     
    843906
    844907        /* cd into the parent dir to pin it. */
    845         ret = SMB_VFS_CHDIR(conn, parent_dir);
     908        ret = vfs_ChDir(conn, parent_dir);
    846909        if (ret == -1) {
    847910                saved_errno = errno;
     
    862925        id = vfs_file_id_from_sbuf(conn, &local_fname.st);
    863926        for (fsp = file_find_di_first(conn->sconn, id); fsp;
    864             file_find_di_next(fsp)) {
     927                     fsp = file_find_di_next(fsp)) {
    865928                if (fsp->access_mask & DELETE_ACCESS &&
    866929                                fsp->delete_on_close) {
     
    897960        TALLOC_FREE(parent_dir);
    898961
    899         vfs_ChDir(conn, conn->connectpath);
     962        if (saved_dir) {
     963                vfs_ChDir(conn, saved_dir);
     964        }
    900965        if (saved_errno) {
    901966                errno = saved_errno;
     
    909974        int ret;
    910975
     976        /* Try the normal rmdir first. */
    911977        ret = SMB_VFS_NEXT_RMDIR(handle, path);
    912         if (!(ret == -1 && (errno == EACCES || errno == EPERM))) {
    913                 DEBUG(10,("rmdir_acl_common: unlink of %s failed %s\n",
    914                         path,
    915                         strerror(errno) ));
    916                 return ret;
    917         }
    918 
    919         return acl_common_remove_object(handle,
    920                                         path,
    921                                         true);
     978        if (ret == 0) {
     979                return 0;
     980        }
     981        if (errno == EACCES || errno == EPERM) {
     982                /* Failed due to access denied,
     983                   see if we need to root override. */
     984                return acl_common_remove_object(handle,
     985                                                path,
     986                                                true);
     987        }
     988
     989        DEBUG(10,("rmdir_acl_common: unlink of %s failed %s\n",
     990                path,
     991                strerror(errno) ));
     992        return -1;
    922993}
    923994
     
    10391110        int ret;
    10401111
     1112        /* Try the normal unlink first. */
    10411113        ret = SMB_VFS_NEXT_UNLINK(handle, smb_fname);
    1042         if (!(ret == -1 && (errno == EACCES || errno == EPERM))) {
    1043                 DEBUG(10,("unlink_acl_common: unlink of %s failed %s\n",
    1044                         smb_fname->base_name,
    1045                         strerror(errno) ));
    1046                 return ret;
    1047         }
    1048         /* Don't do anything fancy for streams. */
    1049         if (smb_fname->stream_name) {
    1050                 return ret;
    1051         }
    1052 
    1053         return acl_common_remove_object(handle,
     1114        if (ret == 0) {
     1115                return 0;
     1116        }
     1117        if (errno == EACCES || errno == EPERM) {
     1118                /* Failed due to access denied,
     1119                   see if we need to root override. */
     1120
     1121                /* Don't do anything fancy for streams. */
     1122                if (smb_fname->stream_name) {
     1123                        return -1;
     1124                }
     1125                return acl_common_remove_object(handle,
    10541126                                        smb_fname->base_name,
    10551127                                        false);
     1128        }
     1129
     1130        DEBUG(10,("unlink_acl_common: unlink of %s failed %s\n",
     1131                smb_fname->base_name,
     1132                strerror(errno) ));
     1133        return -1;
    10561134}
    10571135
  • vendor/current/source3/modules/vfs_acl_tdb.c

    r740 r746  
    1919 */
    2020
    21 /* NOTE: This is an experimental module, not yet finished. JRA. */
    22 
    2321#include "includes.h"
    2422#include "smbd/smbd.h"
  • vendor/current/source3/modules/vfs_acl_xattr.c

    r740 r746  
    1818 * along with this program; if not, see <http://www.gnu.org/licenses/>.
    1919 */
    20 
    21 /* NOTE: This is an experimental module, not yet finished. JRA. */
    2220
    2321#include "includes.h"
     
    122120        unbecome_root();
    123121        if (ret) {
    124                 errno = saved_errno;
    125122                DEBUG(5, ("store_acl_blob_fsp: setting attr failed for file %s"
    126123                        "with error %s\n",
    127124                        fsp_str_dbg(fsp),
    128                         strerror(errno) ));
    129                 return map_nt_error_from_unix(errno);
     125                        strerror(saved_errno) ));
     126                errno = saved_errno;
     127                return map_nt_error_from_unix(saved_errno);
    130128        }
    131129        return NT_STATUS_OK;
  • vendor/current/source3/modules/vfs_aio_fork.c

    r740 r746  
    102102        bool cancelled;
    103103        bool read_cmd;
     104        bool called_from_suspend;
     105        bool completion_done;
    104106};
    105107
     
    433435        }
    434436
     437        if (child->called_from_suspend) {
     438                child->completion_done = true;
     439                return;
     440        }
    435441        aio_ex = (struct aio_extra *)child->aiocb->aio_sigevent.sigev_value.sival_ptr;
    436442        smbd_aio_complete_aio_ex(aio_ex);
     443        TALLOC_FREE(aio_ex);
    437444}
    438445
     
    827834
    828835                for (child = children->children; child != NULL; child = child->next) {
     836                        struct tevent_fd *event;
     837
    829838                        if (child->aiocb == NULL) {
    830839                                continue;
     
    841850                        }
    842851
    843                         /* We're never using this event on the
    844                          * main event context again... */
    845                         TALLOC_FREE(child->sock_event);
    846 
    847                         child->sock_event = event_add_fd(ev,
    848                                                 child,
    849                                                 child->sockfd,
    850                                                 EVENT_FD_READ,
    851                                                 handle_aio_completion,
    852                                                 child);
    853 
    854                         while (1) {
     852                        event = event_add_fd(ev,
     853                                             frame,
     854                                             child->sockfd,
     855                                             EVENT_FD_READ,
     856                                             handle_aio_completion,
     857                                             child);
     858
     859                        child->called_from_suspend = true;
     860
     861                        while (!child->completion_done) {
    855862                                if (tevent_loop_once(ev) == -1) {
    856863                                        goto out;
     
    860867                                        errno = EAGAIN;
    861868                                        goto out;
    862                                 }
    863 
    864                                 /* We set child->aiocb to NULL in our hooked
    865                                  * AIO_RETURN(). */
    866                                 if (child->aiocb == NULL) {
    867                                         break;
    868869                                }
    869870                        }
  • vendor/current/source3/modules/vfs_aixacl2.c

    r740 r746  
    1919
    2020#include "includes.h"
     21#include "system/filesys.h"
    2122#include "smbd/smbd.h"
    2223#include "nfs4_acls.h"
  • vendor/current/source3/modules/vfs_commit.c

    r740 r746  
    236236        }
    237237
    238         return 0;
     238        return fd;
    239239}
    240240
  • vendor/current/source3/modules/vfs_default.c

    r740 r746  
    10451045
    10461046#ifdef HAVE_KERNEL_OPLOCKS_LINUX
    1047         /* first set the signal handler */
    1048         if(linux_set_lease_sighandler(fsp->fh->fd) == -1) {
    1049                 return -1;
    1050         }
    1051 
    10521047        result = linux_setlease(fsp->fh->fd, leasetype);
    10531048#else
     
    11831178{
    11841179        SMB_STRUCT_STAT sbuf;
    1185         unsigned int num_streams = 0;
    1186         struct stream_struct *streams = NULL;
     1180        struct stream_struct *tmp_streams = NULL;
    11871181        int ret;
    11881182
     
    12191213        }
    12201214
    1221         streams = talloc(mem_ctx, struct stream_struct);
    1222 
    1223         if (streams == NULL) {
     1215        tmp_streams = talloc_realloc(mem_ctx, *pstreams, struct stream_struct,
     1216                                        (*pnum_streams) + 1);
     1217        if (tmp_streams == NULL) {
    12241218                return NT_STATUS_NO_MEMORY;
    12251219        }
    1226 
    1227         streams->size = sbuf.st_ex_size;
    1228         streams->alloc_size = SMB_VFS_GET_ALLOC_SIZE(handle->conn, fsp, &sbuf);
    1229 
    1230         streams->name = talloc_strdup(streams, "::$DATA");
    1231         if (streams->name == NULL) {
    1232                 TALLOC_FREE(streams);
     1220        tmp_streams[*pnum_streams].name = talloc_strdup(tmp_streams, "::$DATA");
     1221        if (tmp_streams[*pnum_streams].name == NULL) {
    12331222                return NT_STATUS_NO_MEMORY;
    12341223        }
    1235 
    1236         num_streams = 1;
     1224        tmp_streams[*pnum_streams].size = sbuf.st_ex_size;
     1225        tmp_streams[*pnum_streams].alloc_size = SMB_VFS_GET_ALLOC_SIZE(handle->conn, fsp, &sbuf);
     1226
     1227        *pnum_streams += 1;
     1228        *pstreams = tmp_streams;
    12371229 done:
    1238         *pnum_streams = num_streams;
    1239         *pstreams = streams;
    12401230        return NT_STATUS_OK;
    12411231}
  • vendor/current/source3/modules/vfs_gpfs.c

    r740 r746  
    599599
    600600        result = gpfs2smb_acl(pacl);
    601         if (result == NULL) {
    602                 goto done;
     601        if (result != NULL) {
     602                errno = 0;
    603603        }
    604604
     
    951951        /* Only handle DOS Attributes */
    952952        if (strcmp(name,SAMBA_XATTR_DOS_ATTRIB) != 0){
    953                 DEBUG(1, ("gpfs_set_xattr:name is %s\n",name));
     953                DEBUG(5, ("gpfs_set_xattr:name is %s\n",name));
    954954                return SMB_VFS_NEXT_SETXATTR(handle,path,name,value,size,flags);
    955955        }
     
    10271027        /* Only handle DOS Attributes */
    10281028        if (strcmp(name,SAMBA_XATTR_DOS_ATTRIB) != 0){
    1029                 DEBUG(1, ("gpfs_get_xattr:name is %s\n",name));
     1029                DEBUG(5, ("gpfs_get_xattr:name is %s\n",name));
    10301030                return SMB_VFS_NEXT_GETXATTR(handle,path,name,value,size);
    10311031        }
  • vendor/current/source3/modules/vfs_prealloc.c

    r740 r746  
    1919
    2020#include "includes.h"
     21#include "system/filesys.h"
    2122#include "smbd/smbd.h"
    2223
  • vendor/current/source3/modules/vfs_smb_traffic_analyzer.c

    r740 r746  
    169169        const char *akey, const char *str, size_t *len)
    170170{
    171         int s1,s2,h,d;
     171        int s1,s2,h;
    172172        AES_KEY key;
    173173        unsigned char filler[17]= "................";
    174174        char *output;
    175         unsigned char crypted[18];
    176175        if (akey == NULL) return NULL;
    177176        samba_AES_set_encrypt_key((unsigned char *) akey, 128, &key);
    178177        s1 = strlen(str) / 16;
    179178        s2 = strlen(str) % 16;
    180         for (h = 0; h < s2; h++) *(filler+h)=*(str+(s1*16)+h);
     179        memcpy(filler, str + (s1*16), s2);
    181180        DEBUG(10, ("smb_traffic_analyzer_send_data_socket: created %s"
    182181                " as filling block.\n", filler));
    183         output = talloc_array(ctx, char, (s1*16)+17 );
    184         d=0;
     182
     183        *len = ((s1 + 1)*16);
     184        output = talloc_array(ctx, char, *len);
    185185        for (h = 0; h < s1; h++) {
    186                 samba_AES_encrypt((unsigned char *) str+(16*h), crypted, &key);
    187                 for (d = 0; d<16; d++) output[d+(16*h)]=crypted[d];
    188         }
    189         samba_AES_encrypt( (unsigned char *) str+(16*h), filler, &key );
    190         for (d = 0;d < 16; d++) output[d+(16*h)]=*(filler+d);
     186                samba_AES_encrypt((unsigned char *) str+(16*h), output+16*h,
     187&key);
     188        }
     189        samba_AES_encrypt(filler, (unsigned char *)(output+(16*h)), &key);
    191190        *len = (s1*16)+16;
    192         return output; 
     191        return output;
    193192}
    194193
  • vendor/current/source3/modules/vfs_streams_depot.c

    r740 r746  
    658658}
    659659
     660static int streams_depot_rmdir(vfs_handle_struct *handle, const char *path)
     661{
     662        struct smb_filename *smb_fname_base = NULL;
     663        NTSTATUS status;
     664        int ret = -1;
     665
     666        DEBUG(10, ("streams_depot_rmdir called for %s\n", path));
     667
     668        /*
     669         * We potentially need to delete the per-inode streams directory
     670         */
     671
     672        status = create_synthetic_smb_fname(talloc_tos(), path,
     673                                            NULL, NULL, &smb_fname_base);
     674        if (!NT_STATUS_IS_OK(status)) {
     675                errno = map_errno_from_nt_status(status);
     676                return -1;
     677        }
     678
     679        if (lp_posix_pathnames()) {
     680                ret = SMB_VFS_NEXT_LSTAT(handle, smb_fname_base);
     681        } else {
     682                ret = SMB_VFS_NEXT_STAT(handle, smb_fname_base);
     683        }
     684
     685        if (ret == -1) {
     686                TALLOC_FREE(smb_fname_base);
     687                return -1;
     688        }
     689
     690        if (smb_fname_base->st.st_ex_nlink == 2) {
     691                char *dirname = stream_dir(handle, smb_fname_base,
     692                                           &smb_fname_base->st, false);
     693
     694                if (dirname != NULL) {
     695                        SMB_VFS_NEXT_RMDIR(handle, dirname);
     696                }
     697                TALLOC_FREE(dirname);
     698        }
     699
     700        ret = SMB_VFS_NEXT_RMDIR(handle, path);
     701
     702        TALLOC_FREE(smb_fname_base);
     703        return ret;
     704}
     705
    660706static int streams_depot_rename(vfs_handle_struct *handle,
    661707                                const struct smb_filename *smb_fname_src,
     
    828874        }
    829875
    830         state.streams = NULL;
    831         state.num_streams = 0;
    832 
    833         if (!S_ISDIR(smb_fname_base->st.st_ex_mode)) {
    834                 if (!add_one_stream(mem_ctx,
    835                                     &state.num_streams, &state.streams,
    836                                     "::$DATA", smb_fname_base->st.st_ex_size,
    837                                     SMB_VFS_GET_ALLOC_SIZE(handle->conn, fsp,
    838                                                        &smb_fname_base->st))) {
    839                         status = NT_STATUS_NO_MEMORY;
    840                         goto out;
    841                 }
    842         }
    843 
     876        state.streams = *pstreams;
     877        state.num_streams = *pnum_streams;
    844878        state.mem_ctx = mem_ctx;
    845879        state.handle = handle;
     
    862896        *pnum_streams = state.num_streams;
    863897        *pstreams = state.streams;
    864         status = NT_STATUS_OK;
     898        status = SMB_VFS_NEXT_STREAMINFO(handle, fsp, fname, mem_ctx, pnum_streams, pstreams);
    865899
    866900 out:
     
    881915        .lstat = streams_depot_lstat,
    882916        .unlink = streams_depot_unlink,
     917        .rmdir = streams_depot_rmdir,
    883918        .rename = streams_depot_rename,
    884919        .streaminfo = streams_depot_streaminfo,
  • vendor/current/source3/modules/vfs_streams_xattr.c

    r740 r746  
    4040static SMB_INO_T stream_inode(const SMB_STRUCT_STAT *sbuf, const char *sname)
    4141{
    42         struct MD5Context ctx;
     42        MD5_CTX ctx;
    4343        unsigned char hash[16];
    4444        SMB_INO_T result;
     
    811811        }
    812812
    813         state.streams = NULL;
    814         state.num_streams = 0;
    815 
    816         if (!S_ISDIR(sbuf.st_ex_mode)) {
    817                 if (!add_one_stream(mem_ctx,
    818                                     &state.num_streams, &state.streams,
    819                                     "::$DATA", sbuf.st_ex_size,
    820                                     SMB_VFS_GET_ALLOC_SIZE(handle->conn, fsp,
    821                                                            &sbuf))) {
    822                         return NT_STATUS_NO_MEMORY;
    823                 }
    824         }
    825 
     813        state.streams = *pstreams;
     814        state.num_streams = *pnum_streams;
    826815        state.mem_ctx = mem_ctx;
    827816        state.handle = handle;
     
    843832        *pnum_streams = state.num_streams;
    844833        *pstreams = state.streams;
    845         return NT_STATUS_OK;
     834
     835        return SMB_VFS_NEXT_STREAMINFO(handle, fsp, fname, mem_ctx, pnum_streams, pstreams);
    846836}
    847837
Note: See TracChangeset for help on using the changeset viewer.