new password API needed

Luke Kenneth Casson Leighton lkcl at switchboard.net
Fri May 22 12:43:34 GMT 1998


jeremy, jean-f, danny, nis people,

i'm creating a set of functions in passdb.c: pdb_get/set for the various
fields in the password databases.  these are all "char*" fields (at the
moment: none of the database systems store ints or floats like relational
databases).

so far, they are:

time_t pdb_get_last_set_time(char *p);
void   pdb_set_last_set_time(char *p, int max_len, time_t t);

char  *pdb_encode_acct_ctrl(uint16 acct_ctrl);
uint16 pdb_decode_acct_ctrl(char *p);

BOOL pdb_gethexpwd(char *p, char *pwd);
void pdb_sethexpwd(char *p, char *pwd, uint16 acct_ctrl);

of the time functions, there will be a further five once i do some more
cut-and-paste.


jeremy, despite doing cut-and-paste from smbpass.c to _create_ these
functions, there are a number of instances where multiple fields are
created with slprintf in smbpass.c, therefore i am reluctant to put these
functions into smbpass.c myself.

jean-francois, you must have cut-and-paste into ldap.c to get the
equivalent of what is now "pdb_sethexpwd()": can i recommend that you use
pdb_set/get-hexpwd()?

danny, welcome once again (now that i remember who you are: sorry!), i
don't know what your password database looks like: i recommend that you
use these functions if your database stores char * in exactly the same
format that private/smbpasswd does.

luke




More information about the samba-technical mailing list