# Patching a file



## synack (Apr 26, 2009)

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 (Apr 26, 2009)

What doing the same from /usr/src instead of from ~ ?


----------



## synack (Apr 26, 2009)

ale said:
			
		

> What doing the same from /usr/src instead of from ~ ?



Yes I am running the command from /usr/src


synack.


----------



## sbattu (Apr 27, 2009)

Try, patch -p0 < patchfile


----------



## synack (Apr 27, 2009)

found the problem. The system source was not installed on the system.


----------

