summaryrefslogtreecommitdiffstats
path: root/source/smbwrapper/smbw.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-10-24 08:08:05 +0000
committerAndrew Tridgell <tridge@samba.org>1998-10-24 08:08:05 +0000
commit2565ccf9de9d5e80fdb5bcadbc7130faba386d95 (patch)
tree5b5846e0b28aa29db5c410336f8e258994d85423 /source/smbwrapper/smbw.c
parent9d863fb1681a5b03696552e1d93fe339b4bae455 (diff)
downloadsamba-2565ccf9de9d5e80fdb5bcadbc7130faba386d95.tar.gz
samba-2565ccf9de9d5e80fdb5bcadbc7130faba386d95.tar.xz
samba-2565ccf9de9d5e80fdb5bcadbc7130faba386d95.zip
volker was concerned about unique inode numbers and smbsh. This set of
changes uses the unique index number from a SMB_QUERY_FILE_ALL_INFO to try to provide inode numbers. If it is 0 then use the hash of the filename as before.
Diffstat (limited to 'source/smbwrapper/smbw.c')
-rw-r--r--source/smbwrapper/smbw.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/smbwrapper/smbw.c b/source/smbwrapper/smbw.c
index 622581b7a67..eb156ce0ef5 100644
--- a/source/smbwrapper/smbw.c
+++ b/source/smbwrapper/smbw.c
@@ -149,6 +149,7 @@ a crude inode number generator
*******************************************************/
ino_t smbw_inode(const char *name)
{
+ if (!*name) return 2;
return (ino_t)str_checksum(name);
}
@@ -1194,7 +1195,8 @@ off_t smbw_lseek(int fd, off_t offset, int whence)
break;
case SEEK_END:
if (!cli_qfileinfo(&file->srv->cli, file->f->cli_fd,
- NULL, &size, NULL, NULL, NULL) &&
+ NULL, &size, NULL, NULL, NULL,
+ NULL, NULL) &&
!cli_getattrE(&file->srv->cli, file->f->cli_fd,
NULL, &size, NULL, NULL, NULL)) {
errno = EINVAL;