[PATCH][SAMBA_4_0] modular services configuration

Stefan (metze) Metzmacher metze at samba.org
Fri Jul 21 11:19:32 GMT 2006

Hash: SHA1

simo schrieb:
> On Wed, 2006-07-19 at 16:22 +0200, Stefan (metze) Metzmacher wrote:
>>> Will try to address the problems you mentioned soon, are you ok if I
>>> commit it to the tree when these problems are solved? Or do you prefer
>>> to review the code again as a patch?
>> as patch please:-)
> And here it is.

I almost happy:-)

just a few minor things:

- - can you change the error handling
  from if ((foo = function()) == NULL)
  of if (!NT_STATUS_IS_OK(function())
  foo = function();
  if (!foo) ...
  ntstatus = function();
  if (!NT_STATUS_IS_OK(ntstatus))

  I think this is much more readable and
  in gdb you can do a p ntstatus, and also this is
  how the rest of samba4 looks like

- - make more functions static!

>  	r->out.status = 0;
> -	r->out.available = dcesrv_common_get_count_of_shares(mem_ctx, NULL);
> +	r->out.available = 0;
> +	r->out.info = NULL;
> +
> +	if (!NT_STATUS_IS_OK(share_get_context(mem_ctx, &sctx)) &&
> +	    !NT_STATUS_IS_OK(share_list_all(mem_ctx, sctx, &count, &snames))) {
> +
> +		return NT_STATUS_OK;
> +	}

this is wrong! If there's an error we should return the error!

ntstatus = share_get_context(mem_ctx, &sctx);
if (!NT_STATUS_IS_OK(ntstatus)) {
      return ntstatus_to_werror(ntstatus);

ntstatus = share_list_all(mem_ctx, sctx, &count, &snames);
if (!NT_STATUS_IS_OK(ntstatus)) {
      return ntstatus_to_werror(ntstatus);

there are also some other places in that patch with a simular thing.

I would like to have this commited in steps:

1.) remove the create and delete hooks
2.) commit the interface change together with the classic module
3.) commit the ldb module
4.) commit and the ldif stuff
5.) readd the create and delete hooks

Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org


More information about the samba-technical mailing list