patch samr "SAMR_SET_USERINFO2", samba-3.0.2pre1.

Andrew Bartlett abartlet at samba.org
Fri Jan 9 11:21:54 GMT 2004


On Fri, Jan 09, 2004 at 11:59:18AM +0100, Jianliang Lu wrote:
> This fix will allow setting "never expire" to a user accout from 
> usrmgr, "account" field.
> 
> Patch:
> 
> --- samba-3.0.2pre1/source/rpc_server/srv_samr_util.c.orig	Fri Jan  9 
> 11:09:26 2004
> +++ samba-3.0.2pre1/source/rpc_server/srv_samr_util.c	Fri Jan  9 11:12:20 
> 2004
> @@ -88,13 +88,12 @@
>  			pdb_set_logoff_time(to, unix_time, PDB_CHANGED);
>  	}
>  	
> -	if (!nt_time_is_zero(&from->kickoff_time)) {
> -		unix_time=nt_time_to_unix(&from->kickoff_time);
> -		stored_time = pdb_get_kickoff_time(to);
> -		DEBUG(10,("INFO_21 KICKOFF_TIME: %lu -> %lu\n",(long unsigned 
> int)stored_time, (long unsigned int)unix_time));
> -		if (stored_time != unix_time) 
> -			pdb_set_kickoff_time(to, unix_time , PDB_CHANGED);
> -	}	
> +	/* for kickoff_time we should allow it to be zero, means never expire 
> */

Have you done traces to ensure that there is not some other flags that
is being set?  We found that some of the 'padding' in this structure
is in fact a set of flags, on which feilds are present.

Andrew Bartlett


More information about the samba-technical mailing list