[PATCHES] MSZIP support for cabinet files

Jeremy Allison jra at samba.org
Wed Jul 19 19:21:47 UTC 2017


On Wed, Jul 19, 2017 at 04:08:19PM +0200, Aurélien Aptel wrote:

The patch below was tagged onto the end of the previous set of MS-ZIP cab
patches.

Doesn't look like it belongs to me so I didn't review/push.

Andreas/Aurélien, if it does belong can you repost as a
separate reqested patch.

Looks like it also needs a bug number if you need this
back-porting.

Cheers,

	Jeremy.

> From 4fa9daee19bf7b2023fc2e59b2e4b97e251211ef Mon Sep 17 00:00:00 2001
> From: Andreas Schneider <asn at samba.org>
> Date: Tue, 11 Jul 2017 09:41:08 +0200
> Subject: [PATCH 15/15] s3:client: Only do krb5 auth in smbspool if cache
>  exists
> 
> Signed-off-by: Andreas Schneider <asn at samba.org>
> ---
>  source3/client/smbspool.c | 19 ++++++++++++++++++-
>  1 file changed, 18 insertions(+), 1 deletion(-)
> 
> diff --git a/source3/client/smbspool.c b/source3/client/smbspool.c
> index 49241c73bf1..c293e37149b 100644
> --- a/source3/client/smbspool.c
> +++ b/source3/client/smbspool.c
> @@ -503,6 +503,7 @@ smb_connect(const char *workgroup,	/* I - Workgroup */
>  	struct cli_state *cli;	/* New connection */
>  	char           *myname = NULL;	/* Client name */
>  	struct passwd  *pwd;
> +	bool do_password_auth = false;
>  
>  	/*
>           * Get the names and addresses of the client and server...
> @@ -517,7 +518,23 @@ smb_connect(const char *workgroup,	/* I - Workgroup */
>  	 * behavior with 3.0.14a
>  	 */
>  
> -	if (username && *username && !getenv("KRB5CCNAME")) {
> +	if (username != NULL && username[0] != '\0') {
> +		const char *env = getenv("KRB5CCNAME");
> +
> +		if (env == NULL || env[0] == '\0') {
> +			do_password_auth = true;
> +		} else {
> +			struct stat sb;
> +			int rc;
> +
> +			rc = stat(env, &sb);
> +			if (rc == 0) {
> +				do_password_auth = true;
> +			}
> +		}
> +	}
> +
> +	if (do_password_auth) {
>  		cli = smb_complete_connection(myname, server, port, username,
>  				    password, workgroup, share, 0, need_auth);
>  		if (cli) {
> -- 
> 2.12.3
> 




More information about the samba-technical mailing list