Patch question?

Patch question?

Post by Dal » Wed, 05 Mar 2003 06:23:45



Hello,
I have read everything I can find on Patch, but for some reason I
can't get this. When it asks for file to patch, what do you type?
i have tried everythinh under the sun, and it says file not found. I
have tried every way that I can think of for the path to that file. Is
there a secret way to answer this question

Thanks in Advance,
Dale

server1# patch -p0 < /patches/sendmail.8.12.security.cr.patch
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- sendmail/headers.c 13 Jan 2003 19:30:28 -0000      8.266.4.3
|+++ sendmail/headers.c 16 Jan 2003 23:31:17 -0000
--------------------------
File to patch:

 
 
 

Patch question?

Post by Simon Barne » Wed, 05 Mar 2003 07:46:45


Hi,

Quote:> I have read everything I can find on Patch, but for some reason I
> can't get this. When it asks for file to patch, what do you type?
> i have tried everythinh under the sun, and it says file not found. I
> have tried every way that I can think of for the path to that file. Is
> there a secret way to answer this question
> server1# patch -p0 < /patches/sendmail.8.12.security.cr.patch
> Hmm...  Looks like a unified diff to me...
> The text leading up to this was:
> --------------------------
>|--- sendmail/headers.c 13 Jan 2003 19:30:28 -0000      8.266.4.3
>|+++ sendmail/headers.c 16 Jan 2003 23:31:17 -0000
> --------------------------
> File to patch:

FreeBSD's source version of Sendmail resides in /usr/src/contrib/sendmail

The file headers.c, which is modified by the patch is located in
/usr/src/contrib/sendmail/src, which is different from the patch.

The following should make the patch work:
Edit the patch file like this:
--- headers.c 13 Jan 2003 19:30:28 -0000      8.266.4.3
+++ headers.c 16 Jan 2003 23:31:17 -0000

cd /usr/src/contrib/sendmail/src
patch < /patches/sendmail.8.12.security.cr.patch

Although this might work, a better option is IMHO to wait until the sendmail
maintainer has applied the sendmail patch to the FreeBSD source tree and
committed the changes to the CVS.

I am sure that a security alert and possibly also instructions how to fix the
situation on FreeBSD will be posted on the security lists soon.

Regards,
 Simon

 
 
 

Patch question?

Post by Steven G. Kar » Wed, 05 Mar 2003 08:02:36




Quote:> Hello,
> I have read everything I can find on Patch, but for some reason I
> can't get this. When it asks for file to patch, what do you type?

^C

No kidding.  I never remember what portions of the path to
delete.  I go to the directory where the file resides and
incremental increase -pN if needed.

Quote:> Hmm...  Looks like a unified diff to me...
> The text leading up to this was:
> --------------------------
>|--- sendmail/headers.c 13 Jan 2003 19:30:28 -0000      8.266.4.3
>|+++ sendmail/headers.c 16 Jan 2003 23:31:17 -0000
> --------------------------

cd /usr/src/contrib
patch < $PATH_TO/sendmail.8.12.security.cr.patch

or

cd /usr/src/contrib/sendmail
patch -pN < $PATH_TO/sendmail.8.12.security.cr.patch

N = 0, then, 1, then, 2 ...

--
Steve
http://troutmask.apl.washington.edu/~kargl/

 
 
 

Patch question?

Post by Steve O'Hara-Smit » Wed, 05 Mar 2003 06:39:39


On 3 Mar 2003 13:23:45 -0800

D> Hello,
D> I have read everything I can find on Patch, but for some reason I
D> can't get this. When it asks for file to patch, what do you type?

        You don't - you break out and adjust the -p level or switch
to the directory the patch was made against. In this case I'd say
that would be /usr/src/usr.sbin.

--
C:>WIN                                      |     Directable Mirrors
The computer obeys and wins.                |A Better Way To Focus The Sun
You lose and Bill collects.                 |  licenses available - see:
                                            |   http://www.sohara.org/

 
 
 

Patch question?

Post by Simon Barne » Wed, 05 Mar 2003 18:14:13


Quote:> The following should make the patch work:
> Edit the patch file like this:
> --- headers.c 13 Jan 2003 19:30:28 -0000      8.266.4.3
> +++ headers.c 16 Jan 2003 23:31:17 -0000

> cd /usr/src/contrib/sendmail/src
> patch < /patches/sendmail.8.12.security.cr.patch

Using one of the -pN options is a much cleaner solution, of course!

Simon

 
 
 

Patch question?

Post by Dal » Fri, 07 Mar 2003 03:52:17


Thanks everyone for your help.
the FreeBSD site now has exact instructions about how to install this
patch. I think I'll try them.

Thanks Again,
Dale

 
 
 

1. patch question

I have installed solaris 8 recently,  what is the easiest way to find out
which patches needs to be installed on this machine, especially security
patches.
Thanks-Rob

2. awk problem: Can't get FS to work right!

3. Patch question

4. HELP, for an interactive machine

5. Sun ONE Directory Server 5.1 Patch questions

6. help with a mouse problem.

7. Kernel Patch Question

8. SATAN on RedHat 6.0

9. Patches question

10. patch question

11. ifconfig alias patch question

12. solaris package & patches questions

13. Recommended Patch Question!