Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Applying Patches on Redhat

Status
Not open for further replies.

netwalker1

Programmer
Joined
Feb 5, 2000
Messages
1,241
Location
EG
Dear All :
how can I apply patches on Linux ?

I have this patch for example :

--- wu-ftpd-2.6.2-orig/src/ftpd.c Thu Nov 29 17:56:11 2001
+++ wu-ftpd-2.6.2/src/ftpd.c Thu Jan 22 13:38:33 2004
@@ -1662,9 +1662,9 @@
/* Display s/key challenge where appropriate. */

if (pwd == NULL || skeychallenge(&skey, pwd->pw_name, sbuf))
- sprintf(buf, "Password required for %s.", name);
+ snprintf(buf, sizeof(buf)-1, "Password required for %s.", name);
else
- sprintf(buf, "%s %s for %s.", sbuf,
+ snprintf(buf, sizeof(buf)-1, "%s %s for %s.", sbuf,
pwok ? "allowed" : "required", name);
return (buf);
}



what should I do ?

Mohamed Farid
[green]Know Me No Pain , No Me Know Pain !!![/green]
 
Which Linux?



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
redhat Advanced Server 2.1

Mohamed Farid
[green]Know Me No Pain , No Me Know Pain !!![/green]
 
Fedora Core or RHEL?
Fedora Core uses yum/yume to manage packages, and should be the way you patch the system.

RHEL uses Red Hat network, and notify you when there is a critical update. If in doubt, run up2date from a terminal.

If the software was compiled locally, and not installed as a package, then edit the file:

wu-ftpd-2.6.2-orig/src/ftpd.c

And remove the lines with -, and add the lines with + on lines, and recompile. Or just grab a patched version of ftpd.c and recompile, which is the easier route. :)

[plug=shameless]
[/plug]
 
from where can I get the patched version ?

Mohamed Farid
[green]Know Me No Pain , No Me Know Pain !!![/green]
 
From RedHat?



BocaBurger
<===========================||////////////////|0
The pen is mightier than the sword, but the sword hurts more!
 
If you are using RedHat and REALLY find the need to patch wu-ftp before an RPM update is available. Download the .SRC of the wu-ftp, install the proper patch to the source, and rebuild the package as an .RPM using rpmbuild.

M. Brooks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top