[Pkg-samba-maint] Preparing 3.0.23 package...updating patches...and a problem

Steve Langasek vorlon at debian.org
Tue Apr 25 08:31:14 UTC 2006


On Tue, Apr 25, 2006 at 10:27:36AM +0200, Christian Perrier wrote:
> Guys, I need your skills here.

> As usual, a new samba release means we have to update our
> patches...which is usually fairly trivial.

> however, with the fhs.patch patch, I fail to be sure what to do with
> the following hunk that doesn't apply anymore:

> Index: samba-3.0.21c/source/passdb/pdb_tdb.c
> ===================================================================
> --- samba-3.0.21c.orig/source/passdb/pdb_tdb.c	2006-02-25 11:57:11.605356739 +0100
> +++ samba-3.0.21c/source/passdb/pdb_tdb.c	2006-02-25 11:58:15.997364563 +0100
> @@ -918,10 +918,7 @@
>  	if (location) {
>  		tdb_state->tdbsam_location = talloc_strdup(pdb_context->mem_ctx, location);
>  	} else {
> -		pstring tdbfile;
> -		get_private_directory(tdbfile);
> -		pstrcat(tdbfile, "/");
> -		pstrcat(tdbfile, PASSDB_FILE_NAME);
> +		char *tdbfile = state_path(PASSDB_FILE_NAME);
>  		tdb_state->tdbsam_location = talloc_strdup(pdb_context->mem_ctx, tdbfile);
>  	}

> The relevant part of the code seems to be now:

> static NTSTATUS pdb_init_tdbsam(struct pdb_methods **pdb_method, const char *location)
> {
> 	NTSTATUS nt_status;
> 	pstring tdbfile;
> 	const char *pfile = location;
> 
> 	if (!NT_STATUS_IS_OK(nt_status = make_pdb_method( pdb_method ))) {
> 		return nt_status;
> 	}
> 
> 	(*pdb_method)->name = "tdbsam";
> 
> 	(*pdb_method)->setsampwent = tdbsam_setsampwent;
> 	(*pdb_method)->endsampwent = tdbsam_endsampwent;
> 	(*pdb_method)->getsampwent = tdbsam_getsampwent;
> 	(*pdb_method)->getsampwnam = tdbsam_getsampwnam;
> 	(*pdb_method)->getsampwsid = tdbsam_getsampwsid;
> 	(*pdb_method)->add_sam_account = tdbsam_add_sam_account;
> 	(*pdb_method)->update_sam_account = tdbsam_update_sam_account;
> 	(*pdb_method)->delete_sam_account = tdbsam_delete_sam_account;
> 	(*pdb_method)->rename_sam_account = tdbsam_rename_sam_account;
> 
> 	(*pdb_method)->rid_algorithm = tdbsam_rid_algorithm;
> 	(*pdb_method)->new_rid = tdbsam_new_rid;
> 
> 	/* save the path for later */
> 			   
> 	if ( !location ) {
> 		pstr_sprintf( tdbfile, "%s/%s", lp_private_dir(), PASSDB_FILE_NAME );
		                                ^^^^^^^^^^^^^^^^

lp_private_dir() needs to be replaced with dyn_STATEDIR(), since our
"private" dir is /etc/samba and we need this tdb file to end up in /var/lib.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
vorlon at debian.org                                   http://www.debian.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-samba-maint/attachments/20060425/6a8474ec/attachment.pgp


More information about the Pkg-samba-maint mailing list