[PATCH] Use one function to print ntlmssp flags strings

Stefan (metze) Metzmacher metze at samba.org
Thu Aug 10 11:28:36 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kai Blin schrieb:
> Hi folks,
> 
> attached is a patch that makes the ntlm_auth GF command return a string list 
> of features. To do so, it adds a function to libsmb/ntlmssp.c that creates a 
> string from ntlmssp flags taking a format string. The function is also used 
> to print the negotiated flags with debugging turned on.

Hi Kai,

please add a TALLOC_CTX *mem_ctx arg.
and do as first thing talloc_strdup(mem_ctx, "");
then you would give a valid string back when no flags
are selected, instead of NULL.

if a talloc_* call fails we should directly return NULL.

Also it would be nice to give the compiler a chance to
check the format string, (I'm not sure if this is possible
in this situation...)

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

iD8DBQFE2xgam70gjA5TCD8RAg5ZAKCE+6LLiw6tourIepPFbzolaYBY9gCcC9oe
wprZujTUbvwmzM0nIzMBxm0=
=Vv8+
-----END PGP SIGNATURE-----


More information about the samba-technical mailing list