diff options
author | Stefan Metzmacher <metze@samba.org> | 2008-05-23 09:46:50 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2008-05-23 09:55:15 +0200 |
commit | 391b746430ad3d0b371930933e0a77e6a70a9ac0 (patch) | |
tree | 1690bffe1fb7cdddd04f1789897d331afbda3fd7 /source4 | |
parent | c78bf3c2c925060df3362625bbd1c3e96751c087 (diff) | |
download | samba-391b746430ad3d0b371930933e0a77e6a70a9ac0.tar.gz samba-391b746430ad3d0b371930933e0a77e6a70a9ac0.tar.bz2 samba-391b746430ad3d0b371930933e0a77e6a70a9ac0.zip |
pvfs_resolve: stream_name = "" is only the same as NULL for files
metze
(This used to be commit 47756129fdf01075bac06cdd24107d7dc8ba34af)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/ntvfs/posix/pvfs_fileinfo.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_resolve.c | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/source4/ntvfs/posix/pvfs_fileinfo.c b/source4/ntvfs/posix/pvfs_fileinfo.c index e35f42e955..04f6ad78d0 100644 --- a/source4/ntvfs/posix/pvfs_fileinfo.c +++ b/source4/ntvfs/posix/pvfs_fileinfo.c @@ -58,6 +58,8 @@ NTSTATUS pvfs_fill_dos_info(struct pvfs_state *pvfs, struct pvfs_filename *name, if (S_ISDIR(name->st.st_mode)) { name->st.st_size = 0; name->st.st_nlink = 1; + } else if (name->stream_id == 0) { + name->stream_name = NULL; } /* for now just use the simple samba mapping */ diff --git a/source4/ntvfs/posix/pvfs_resolve.c b/source4/ntvfs/posix/pvfs_resolve.c index 325bc74f8f..2e97925c49 100644 --- a/source4/ntvfs/posix/pvfs_resolve.c +++ b/source4/ntvfs/posix/pvfs_resolve.c @@ -202,7 +202,13 @@ static NTSTATUS parse_stream_name(struct pvfs_filename *name, const char *s) } *p = 0; if (strcmp(name->stream_name, "") == 0) { - name->stream_name = NULL; + /* + * we don't set stream_name to NULL, here + * as this would be wrong for directories + * + * pvfs_fill_dos_info() will set it to NULL + * if it's not a directory. + */ name->stream_id = 0; } else { name->stream_id = pvfs_name_hash(name->stream_name, |