PDA

View Full Version : [Solved] Patching a file


synack
April 26th, 2009, 05:52
Hi,

I have received the latest Security Advisories and am trying to patch my server. I have the latest patches on my system but am not sure what to do when I run the following;

# patch < /home/synack/openssl.patch
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: crypto/openssl/crypto/asn1/asn1_err.c
|================================================= ==================
|--- crypto/openssl/crypto/asn1/asn1_err.c (revision 191346)
|+++ crypto/openssl/crypto/asn1/asn1_err.c (working copy)
--------------------------
File to patch: crypto/openssl/crypto/asn1/asn1_err.c
No file found--skip this patch? [n]

I am not sure what to put where it asks which file to patch. I have tried entering /usr/src/crypto/openssl/crypto/asn1/asn1_err.c

but that doesn't seem to work. Any help would be great.

synack.

ale
April 26th, 2009, 08:14
What doing the same from /usr/src instead of from ~ ?

synack
April 26th, 2009, 09:09
What doing the same from /usr/src instead of from ~ ?

Yes I am running the command from /usr/src


synack.

sbattu
April 27th, 2009, 06:24
Try, patch -p0 < patchfile

synack
April 27th, 2009, 08:06
found the problem. The system source was not installed on the system.