summaryrefslogtreecommitdiff
path: root/source3/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
commitfb556e14f3b47d5a1f465589084e8b30d84af8ca (patch)
tree90efd6b2e60d40552f23b481f08e69b5e9e24178 /source3/smbwrapper/smbw.c
parent4140f2bfc141ee9a91723d274344769f8b11a5f9 (diff)
downloadsamba-fb556e14f3b47d5a1f465589084e8b30d84af8ca.tar.gz
samba-fb556e14f3b47d5a1f465589084e8b30d84af8ca.tar.bz2
samba-fb556e14f3b47d5a1f465589084e8b30d84af8ca.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. (This used to be commit 2565ccf9de9d5e80fdb5bcadbc7130faba386d95)
Diffstat (limited to 'source3/smbwrapper/smbw.c')
-rw-r--r--source3/smbwrapper/smbw.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/smbwrapper/smbw.c b/source3/smbwrapper/smbw.c
index 622581b7a6..eb156ce0ef 100644
--- a/source3/smbwrapper/smbw.c
+++ b/source3/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;