password API needed

Jeremy Allison jallison at
Tue May 19 19:13:19 GMT 1998

Edan Idzerda wrote:
> >From linux/fs/smbfs/inode.c:
>     static struct super_operations smb_sops =
>     {
>             smb_read_inode,         /* read inode */
>             NULL,                   /* write inode */
>             smb_put_inode,          /* put inode */
>             smb_delete_inode,       /* delete inode */
>             smb_notify_change,      /* notify change */
>             smb_put_super,          /* put superblock */
>             NULL,                   /* write superblock */
>             smb_statfs,             /* stat filesystem */
>             NULL                    /* remount filesystem */
>     };
> I believe that a NULL function pointer in Linux's VFS layer means
> "give me default behavior."  Solaris on the other hand uses
> actual dummy functions like fs_nosys or fs_sync to do this.
> For as many of the things that Linux does right, maybe this is not
> one of them :)

Well it's a matter of taste to me. I hate having NULL entries
in function tables as they can mean 'give me default behaviour'
or 'oh dear I forgot to initialize this' :-).

I prefer insisting on entries being present - even if it only
points to a stub function that prints "not implemented" :-).

But what Luke did was worse than just giving default behavior,
he was also calling a bunch of conversion functions so password
db writers "didn't have to worry about implementing that stuff".

Putting that into the vector indirection code was anathema to
me (which is why I'm getting him to change it) as that decision
could be made by the db implementor - who could by all means
call separate conversion functions provided in passdb.c if
they wished - I just didn't want it to happen 'under the covers'
so to speak.


Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.

More information about the samba-technical mailing list