Sponsored Content
Operating Systems Linux Debian Applying patch for Samba version 4.1.17 Post 303001329 by anaigini45 on Wednesday 2nd of August 2017 01:33:00 AM
Old 08-02-2017
According the patch guide, the patch has to be installed, then only build samba from source. However, when I apply the patch, this is the error I receive :

Code:
root@TestVM:/home/aigini/samba-4.6.6# patch -p1 < samba-4.1.16-CVE-2015-0240.patch
patching file source3/rpc_server/netlogon/srv_netlog_nt.c
Reversed (or previously applied) patch detected!  Assume -R? [n] y
Hunk #1 succeeded at 1113 (offset 12 lines).
Hunk #2 FAILED at 1258.
1 out of 2 hunks FAILED -- saving rejects to file source3/rpc_server/netlogon/srv_netlog_nt.c.rej
patching file source3/rpc_server/netlogon/srv_netlog_nt.c
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n] y
Hunk #1 FAILED at 1275.
1 out of 1 hunk FAILED -- saving rejects to file source3/rpc_server/netlogon/srv_netlog_nt.c.rej
root@TestVM:/home/aigini/samba-4.6.6#

What does the error mean, and how do I resolve this error?

Also, If I were to re-build samba from source, what will happen to the current samba which is installed on the server? Will it cause any problems/crash?

---------- Post updated at 01:33 PM ---------- Previous update was at 11:56 AM ----------

I tried changing the option for -p to 0 instead of 1 :

Code:
patch -p0 < samba-4.1.16-CVE-2015-0240.patch

This is the output I get :

Code:
root@TestVM:/home/aigini# patch -p0 < samba-4.1.16-CVE-2015-0240.patch
can't find file to patch at input line 19
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From cc4100701bec64cda6fae6a5650c2114f3862579 Mon Sep 17 00:00:00 2001
|From: Jeremy Allison <jra@samba.org>
|Date: Wed, 28 Jan 2015 14:47:31 -0800
|Subject: [PATCH 1/2] CVE-2015-0240: s3: netlogon: Ensure we don't call
| talloc_free on an uninitialized pointer.
|
|Bug: https://bugzilla.samba.org/show_bug.cgi?id=11077
|
|Signed-off-by: Jeremy Allison <jra@samba.org>
|Reviewed-by: Stefan Metzmacher <metze@samba.org>
|---
| source3/rpc_server/netlogon/srv_netlog_nt.c | 6 +++++-
| 1 file changed, 5 insertions(+), 1 deletion(-)
|
|diff --git a/source3/rpc_server/netlogon/srv_netlog_nt.c b/source3/rpc_server/netlogon/srv_netlog_nt.c
|index c903ae8..cab635f 100644
|--- a/source3/rpc_server/netlogon/srv_netlog_nt.c
|+++ b/source3/rpc_server/netlogon/srv_netlog_nt.c
--------------------------
File to patch:

What do I do next? Is the option I use for patching correct?
 

10 More Discussions You Might Find Interesting

1. Solaris

How to disply the patch version ?!

Hi , I need to collect all information about the patches in my server , I want to know what is the required patch and how to apply it. Regards (2 Replies)
Discussion started by: ArabOracle.com
2 Replies

2. Solaris

How can i see kernel patch version?

Hello experts. How can i see kernel patch version? what are advantages applying that patch? Thanx in advance (5 Replies)
Discussion started by: younus_syed
5 Replies

3. Red Hat

Command to know the Patch Version

Hi, Is there any command to know the patch version?Suppose i installed RTlinux patch in rethat linux.How can i know the patch version installed?Any helps appreciated. Thanks, Sathi. (2 Replies)
Discussion started by: sathiyaraj V
2 Replies

4. Solaris

What kind of steps should be followed while applying patch in real time?

Hi, As in the solaris material i know that the patch is added through the command "patchadd <patch no.>". But i need to know, what are all the steps we have to follow while applying a patch in a production server. My friend says that we have to detach mirror before applying patch and not... (6 Replies)
Discussion started by: Sesha
6 Replies

5. Solaris

Applying Recommended Patch Cluster to Whole Root Zone

Hi there, Apologies if this question has been asked and answered already but I've not been able to find the thread. Question: Is it possible to apply the Solaris 10 Recommended Patch Cluster to a whole root (non-global) zone locally? I.E. apply the patch cluster from the non-global in... (3 Replies)
Discussion started by: nm146332
3 Replies

6. Solaris

Jumpstart and Applying Recommended Patch Cluster

I'm trying to setup our jumpstart server to automatically apply the latest patch cluster during installs, but I'm running into an issue. Every time Jumpstart runs it has this error. Obviously it's processing the patch_order file, so I'm not sure what I'm missing. ... (0 Replies)
Discussion started by: christr
0 Replies

7. HP-UX

Patch For SAMBA.

Hi guys, Question: I downloaded a security update for samba: samba-3.0.7-CAN-2004-0882.patch The question is how can I get in installed? I cannot find instructions anywhere and it is not a tar file. Little help? (1 Reply)
Discussion started by: 300zxmuro
1 Replies

8. UNIX for Dummies Questions & Answers

Typical steps to be followed while applying an application patch upgrade on linux

what are the typical steps used by system adminstrators while applying an application patch upgrade (1 Reply)
Discussion started by: ramky79
1 Replies

9. HP-UX

Samba version on HP-UX

I am running HP-UX 11iv3 March 2013 release. smbstatus -V #output Version 3.4.3 based HP CIFS Server A.03.01.03 What exactly version i am running? is it 3.4.3 or A.03.01.03? Thank you! (1 Reply)
Discussion started by: lamoul
1 Replies

10. Ubuntu

Recompile the kernel after applying a patch in Ubuntu.

I have applied a patch using this command: patch -p1 < (file) then I did git commit -a. Now I want to recompile the kernel for making this patch live. Should I use make oldconfig or make localmodconfig After that, make -j$(grep -c "processor" /proc/cpuinfo) sudo make... (1 Reply)
Discussion started by: BHASKAR JUPUDI
1 Replies
STG-IMPORT(1)							   StGit Manual 						     STG-IMPORT(1)

NAME
stg-import - Import a GNU diff file as a new patch SYNOPSIS
stg import [options] [<file>|<url>] DESCRIPTION
Create a new patch and apply the given GNU diff file (or the standard input). By default, the file name is used as the patch name but this can be overridden with the --name option. The patch can either be a normal file with the description at the top or it can have standard mail format, the Subject, From and Date headers being used for generating the patch information. The command can also read series and mbox files. If a patch does not apply cleanly, the failed diff is written to the .stgit-failed.patch file and an empty StGIT patch is added to the stack. The patch description has to be separated from the data with a --- line. OPTIONS
-m, --mail Import the patch from a standard e-mail file. -M, --mbox Import a series of patches from an mbox file. -s, --series Import a series of patches from a series file or a tar archive. -u, --url Import a patch from a URL. -n NAME, --name NAME Use NAME as the patch name. -p N, --strip N Remove N leading slashes from diff paths (default 1). -t, --stripname Strip numbering and extension from patch name. -i, --ignore Ignore the applied patches in the series. --replace Replace the unapplied patches in the series. -b BASE, --base BASE Use BASE instead of HEAD for file importing. --reject Leave the rejected hunks in corresponding *.rej files. -e, --edit Invoke an editor for the patch description. -d, --showdiff Show the patch content in the editor buffer. -a "NAME <EMAIL>", --author "NAME <EMAIL>" Use "NAME <EMAIL>" as the author details. --authname AUTHNAME Use AUTHNAME as the author name. --authemail AUTHEMAIL Use AUTHEMAIL as the author e-mail. --authdate AUTHDATE Use AUTHDATE as the author date. --sign Add a "Signed-off-by:" to the end of the patch. --ack Add an "Acked-by:" line to the end of the patch. STGIT
Part of the StGit suite - see linkman:stg[1] StGit 03/13/2012 STG-IMPORT(1)
All times are GMT -4. The time now is 04:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy