RFC: passdb redesign
Gerald Carter
gcarter at valinux.com
Thu Nov 9 21:02:19 GMT 2000
Gerald Carter wrote:
>
> Proposed Interface
> ------------------
>
> Functions for manipulating sam_passwd struct (common to all
> backends)
>
> pdb_get...(SAM_ACCOUNT_HND *hnd)
> pdb_set...(SAM_ACCOUNT_HND *hnd)
ok. the pdb_new_sam_account() function should be
in the general passdb interface as it is not backend
storage specific (should just create a new sam_passwd
struct associated with a HANDLE and stored in a list
(only in memory)).
/* create a new (and empty) sam_passwd struct */
SAM_ACCOUNT_HND* pdb_new_sam_account ();
>
> Backend storage access functions which must be implemented
> by each passdb module
>
> /* search functions */
> SAM_ACCOUNT_HND* pdb_getsampwnam (char* username);
> SAM_ACCOUNT_HND* pdb_getsampwuid (uid_t uid);
> SAM_ACCOUNT_HND* pdb_getsampwrid (uint32 rid);
> SAM_ACCOUNT_HND* pdb_getsampwent ();
>
...
>
> /* write change to persistent storage */
> /* add a new acount*/
> BOOL pdb_add_sam_account (SAM_ACCOUNT_HND *hnd);
> /* update an account entry */
> BOOL pdb_update_sam_account (SAM_ACCOUNT_HND *hnd);
> /* delete an account entry */
> BOOL pdb_delete_sam_account (SAM_ACCOUNT_HND *hnd);
Don't know what I was thinking before.
Cheers, jerry
----------------------------------------------------------------------
/\ Gerald (Jerry) Carter Professional Services
\/ http://www.valinux.com/ VA Linux Systems gcarter at valinux.com
http://www.samba.org/ SAMBA Team jerry at samba.org
http://www.plainjoe.org/ jerry at plainjoe.org
"...a hundred billion castaways looking for a home."
- Sting "Message in a Bottle" ( 1979 )
More information about the samba-technical
mailing list