smbwrapper return codes
Massimo.Sivilotti at tanner.com
Massimo.Sivilotti at tanner.com
Thu Dec 10 02:15:50 GMT 1998
There's at least one return code that smbwrapper.so is getting wrong.
On Solaris (2.5.1), SunOS (4.1.3) and HPUX (9.01), if you try to open
a file IN A DIRECTORY THAT DOESNT EXIST, you get ENOENT.
Smbwrapper, however, returns ENOTDIR. This screws up cvs royally
(actually, it confuses RCS 'co').
I have only confirmed this behavior on Solaris (the others don't have
shared libraries!).
Here's a simple test program that shows the problem. (suntan2 is the
Solaris box):
Hope this helps. I'm really looking forward to using smbsh
--mass
Script started on Wed Dec 09 17:59:16 1998
[suntan2]</net/hardware/home/mass/tmp/test>% cat tryit.c
#include <stdio.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
main()
{
int f;
extern int errno;
f = open ("RCS/test,v", O_RDONLY);
if (f == -1) {
printf("Error = %d\n", errno);
perror("got error");
}
}
[suntan2]</net/hardware/home/mass/tmp/test>% ls
test,v tryit.c typescript.samba typescript~
tryit typescript typescript.unix
[suntan2]</net/hardware/home/mass/tmp/test>% ./tryit
Error = 2
got error: No such file or directory
[suntan2]</net/hardware/home/mass/tmp/test>% /usr/local/samba/bin/smbsh
Username: mass
Password:
[suntan2]</net/hardware/home/mass/tmp/test>% ~mass/tmp/test/tryit
Error = 2
got error: No such file or directory
[suntan2]</net/hardware/home/mass/tmp/test>% cd /smb/suntan2/mass/tmp/test
[suntan2]</smb/suntan2/mass/tmp/test>% ls
test,v tryit.c typescript.samba typescript~
tryit typescript typescript.unix
[suntan2]</smb/suntan2/mass/tmp/test>% ~mass/tmp/test/tryit
Error = 20
got error: Not a directory
[suntan2]</smb/suntan2/mass/tmp/test>% exit
[suntan2]</smb/suntan2/mass/tmp/test>% exit
[suntan2]</net/hardware/home/mass/tmp/test>% exit
[suntan2]</net/hardware/home/mass/tmp/test>% exit
script done on Wed Dec 09 18:00:31 1998
More information about the samba-technical
mailing list