[Samba] FW: samba woes

Johnston, Christopher (DCSA) cjohnston at exchange.ml.com
Wed Jun 26 10:45:33 GMT 2002


All,
 
I have been working on a component that is included with samba called SMBSH.  The binary allows you to automount your NT shares by accessing your profile .  I have been working on this for the last
few days and have been unsuccesful at getting it work.  Now I am not much of a programmer, but I did my best to try and troubleshoot this.  However it just does not want to work in Linux.  I notice
that during an strace I can see that it is attempting to create a shared environment by using FCNTL calls using 64bit locking.  Later in the code it tries to lock the environment again but I notice
this time the fcntl function stops using the 64bit function and ends up using the 32bit argument. Which eventually forces the program to exit because of an invalid argument
 
Portion of the strace where it locks the shared environment and than unlocks it using fcntl64() using 64bit arguments against it.
 
fcntl64(8191, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=0, len=1}, 0xbffff200) = 0
fstat64(8191, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
fcntl64(8191, F_SETLK64, {type=F_UNLCK, whence=SEEK_SET, start=0, len=1}, 0xbffff200) = 0
 
Portion of the strace where it sets the locks the shared environment again using fcntl() using a 64bit argument against the function.  Which is why I am getting an invalid argument because that
argument can not be used with that function.

fcntl(8191, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=0, len=1}, 0xbfffeec0) = -1 EINVAL (Invalid argument)
write(2, "ERROR: can\'t get smbw shared loc"..., 53ERROR: can't get smbw shared lock (Invalid argument))= 53
 
What I am trying to figure out is.. why is going from using fcntl64() to fcntl().. I have looked through most of the source code and have found nothing.  I have sent emails to the samba lists and to
redhat.  So far I have gotten the following responses.
 
Quote from Redhat:

Hi, I have an update on your issue!

A direct quote from engineering on your issue:

" As I understand it, smbsh can not work on the recent glibc versions as they no longer support the LD_PRELOAD features (hacks? :) smbsh employs. On non linux unix variants smbsh will still work in
general (they dont after all use glibc). The LD_PRELOAD user space fs simply wont work on recent glibc versions alas, LD_PRELOAD itself certainly still works.

" It\'s the \"back door\" symbols _open, _read, _write which allows smbsh to wrap around the normal file calls, possibly redirect them to smb, and then call the actual C library function using the
underscore functions. 

The GNU C library maintainers have decided to remove support for these symbols in glibc 2.1and forward.

" So, overall maybe this is the good reason of why we do not have smbwrapper/smbsh shipped :-)

" I would use autofs, to do the same functionality. You\'d need a program that uses libsmb (or just calls smbclient) to retrieve the browse list, and reformats it into an autofs map."

Jp Robinson

I am just trying to gather some thoughts here to see if anybody has has experiene with an issue like this.. this may not be a samba thing but a GLIBC issue.. any ides? suggestions on what to work on
next?

Thanks,

 
Christopher Johnston
Merrill Lynch / DCSA
(201) 671-2368
http://linux.worldnet.ml.com <http://linux.worldnet.ml.com/> 
 
 
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the samba mailing list