password API needed

Luke Kenneth Casson Leighton lkcl at switchboard.net
Wed May 6 19:47:58 GMT 1998


ok.  we need a xxx_pwd_xxx api.  these are the functions in smbpass.c:


void *startsmbpwent(BOOL update);
void endsmbpwent(void *vp);
struct smb_passwd *getsmbpwent(void *vp);
unsigned long getsmbpwpos(void *vp);
BOOL setsmbpwpos(void *vp, unsigned long tok);
struct smb_passwd *getsmbpwnam(char *name);
struct smb_passwd *getsmbpwuid(unsigned int uid);
char *encode_acct_ctrl(uint16 acct_ctrl);
BOOL add_smbpwd_entry(struct smb_passwd *newpwd);
BOOL mod_smbpwd_entry(struct smb_passwd* pwd, BOOL override);

void *machine_password_lock( char *domain, char *name, BOOL update);
BOOL machine_password_unlock( void *token );
BOOL machine_password_delete( char *domain, char *name );
BOOL get_machine_account_password( void *mach_tok, unsigned char *ret_pwd,
                                   time_t *last_change_time);
BOOL set_machine_account_password( void *mach_tok, unsigned char *md4_new_pwd);


all of these need to _not_ be referenced, and all code needs to refer to:

startsmbent
endsmbend
getsmbend
getsmbpos
getsmbnam
getsmbrid (note: not getsmbuid! :-)
addsmbentry
modsmbentry

these functions should use either SAM_USER_INFO_21 or a structure which
contains both SAM_USER_INFO_21 _and_ struct smb_passwd.

or, a structure which contains SAM_USER_INFO_21 and the unix uid.

the above machine_account functions are specific to private/smbpasswd
(smbpass.c).  the above functions should be able to identify the account
type (ACB_xxxx) such that smbpass.c can call either mod_smbpwd_entry or
set_machine_account_password as appropriate.

hm.

luke



More information about the samba-technical mailing list