problem with open.c

Christopher R. Hertel crh at
Thu Mar 18 07:02:00 GMT 2004

On Wed, Mar 17, 2004 at 10:22:43PM -0800, ankur mattoo wrote:
> hi 
> im currently working on a kernel project for which i
> also  need to do some changes in the samba code ..
> Well im sharing a directory
> eg: /etc/ in smb.conf and when im accessing
> it(/etc/ankur) through a windows NT client the file 
> descriptor returned is -1.
> I figured this out through the logged information.
> Whereas whenever a directory is opened the descritor
> is returned as the positive value.
> I traced back the functions and found it is fd_open in
> the file  samba/source/smbd/open.c
> Now i need to get the file descriptor to get one of my
> functions working ,
> Can anyone help me out with this.
> What could be the problem...
> BTW im logged in as root.

A descriptor value of -1 indicates an error.  It's fairly clear in the
code.  It's also fairly clear that setting a debug level of 10 will 
produce a DEBUG message that will tell you why the open failed.

You don't say which version of Samba you're using, or what the error 
message is.

Chris -)-----

"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team --     -)-----   Christopher R. Hertel
jCIFS Team --   -)-----   ubiqx development, uninq.
ubiqx Team --     -)-----   crh at
OnLineBook --    -)-----   crh at

More information about the samba-technical mailing list