Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Applying a patch to Samba

  • 23-02-2012 12:42am
    #1
    Registered Users, Registered Users 2 Posts: 7,838 ✭✭✭


    I don't know how I'm supposed to apply this patch to my sambe installation. Can anyone help?


    Is it a script for replacing source code and I'm meant to recompile the smbclient from source?



    https://bugzilla.samba.org/show_bug.cgi?id=7635
    From 856c682d5c8ed76a0f3a4fa086aabdde1c06998b Mon Sep 17 00:00:00 2001
    From: Volker Lendecke <vl@samba.org>
    Date: Sat, 21 Aug 2010 11:32:58 +0200
    Subject: [PATCH] s3: Fix bug 7635
    
    ---
     source3/libsmb/climessage.c |    6 ++++--
     1 files changed, 4 insertions(+), 2 deletions(-)
    
    diff --git a/source3/libsmb/climessage.c b/source3/libsmb/climessage.c
    index 2c8ef58..0993037 100644
    --- a/source3/libsmb/climessage.c
    +++ b/source3/libsmb/climessage.c
    @@ -63,8 +63,10 @@ static struct tevent_req *cli_message_start_send(TALLOC_CTX *mem_ctx,
     
     	*p++ = 4;
     	memcpy(p, utmp, ulen);
    +	p += ulen;
     	*p++ = 4;
     	memcpy(p, htmp, hlen);
    +	p += hlen;
     	TALLOC_FREE(htmp);
     	TALLOC_FREE(utmp);
     
    @@ -163,8 +165,8 @@ static struct tevent_req *cli_message_text_send(TALLOC_CTX *mem_ctx,
     		TALLOC_FREE(tmp);
     		return tevent_req_post(req, ev);
     	}
    -	SCVAL(bytes, 0, 0);	/* pad */
    -	SSVAL(bytes, 1, msglen);
    +	SCVAL(bytes, 0, 1);	/* pad */
    +	SSVAL(bytes+1, 0, msglen);
     	memcpy(bytes+3, msg, msglen);
     	TALLOC_FREE(tmp);
     
    -- 
    1.7.0.4
    


Comments

  • Registered Users, Registered Users 2 Posts: 78 ✭✭timbyr


    This link might help you get a quick understanding of how a patch works.

    And yes, you will need to apply this patch to the source code.

    If you haven't been compiling from source already it might suit you better to get the latest source available and use that.

    Edit:
    I just noticed how old that patch is. Did you get your version of Samba from a repository?


  • Registered Users, Registered Users 2 Posts: 1,931 ✭✭✭PrzemoF


    Get familliar with git: https://en.wikipedia.org/wiki/Git_%28software%29

    save the patch and apply with
    git am name-of-the-file
    

    you should get a copy of samba repository first using
    git clone path-to-samba-repo-on-the internet-whenever-it-is
    

    Missed you second question: yes, you have to recompile it.


Advertisement