Hi, I’m using suse 10.2 to run an e-commerce system. We supply goods via
FTP, and our server, vsftpd 2.0.5 has it seems a pretty silly limit of
32 characters for the user name. This has become a major problem for me
as the username we use is a combo of the customers email address + an
invoice number.
The average customers email address is not a problem. But every now and
again we have a customer with a very long email address, and that breaks
our system. I’ve seen builds of vsftpd for Redhat that have had this
limit raised to 128 (which would be fine for us).
Does anyone know if a newer build (2.0.6,7 etc) for SUSE also fixes
this issue? And if so, where I can get the .rpm for this version from?
It doesn’t look like it’s fixed upstream so you may have to hack the
source yourself. Don’t know whether a simple edit of the .h file will
work or if there are any side effects. Good luck. Let us know how you
go.
Ok, I’ve tried downloading and building vsftpd 2.0.5 from the dev site.
Having got it to build, I’ve tried swapping out the bin file with my
original, and then restarting the service. Service restarts as it
should, but I cannot log in to the server (pw file is present and has
been updated etc. If I swap back in the old bin and restart, I can login
again).
I know that after the build I am not getting like for like. I guess the
config files for the build are not the same as those used for the SUSE
build (not surprising really). I can see this as the binary is 90k in
size, whilst the official SUSE rpm’s bin is 140k. I’m obviously missing
a chunk of code
This being a can of worms, what would be ideal is if I could get hold
of the actual source files that were used to build vsftpd 2.0.5 for SUSE
10.2/3. I literally only need to change one line in the defs.h file, and
build. All else being the same, I should have a new bin with no 32 char
limit for usernames (!).
So, is there a location from which we can get hold of the source files
for all SUSE releases?
Anyone have an idea about this. Is there a place I can get the source
for each app supplied with a certain distro i.e. I need the source files
for vsftp in suse 10.2/3
The 10.3 repos should still be available. What you’re looking for is the
SRPM package corresponding to the most recent RPM. Then you have to
unpack the SRPM, insert a patch into the spec file, and then rebuild the
RPM from the new spec file.
Sorry, don’t have the source repo URL offhand. Maybe someone else has
it off the top of the head.
Sorry, could you give a little more info on this stage. I am not a total
noob to Linux, but in terms of building, RPM, SRPMs ety I am…
“Then you have to unpack the SRPM, insert a patch into the spec file,
and then rebuild the RPM from the new spec file.”
I have the srpm for my version of VSFTPD, and I have “unpacked” it
using alien (is this the correct method?). I have edited the defs.h file
in the source folder (this is needed to fix my core problem with
VSFTPD), but this is where my abilities run dry… Where do I go from
here?
To unpack a SRPM, put it in /usr/src/packages/SRPMS, then run rpm -i
foo.srpm It will deposit the source tarball and patches in
/usr/src/packages/SOURCES.
To build, cd to /usr/src/packages/SPECS, edit foo.spec to change the
version number slightly, say add a suffix which are your initials.
rpmbuild -bp foo.spec
to prepare the sources by unpacking the archives and applying the
patches. Then edit the source in /usr/src/packages/BUILD, and do:
rpmbuild -bc foo.spec
to compile. You can then find the modified binary under the BUILD
directory.
NB: If you ever rerun -bp, you will wipe out your changes, so make sure
you have the patch saved somewhere else. See below.
When you are satisfied that your diff works, then you prepare a patch
which you then put in the SOURCES directory along with the original
tarball and other patches, and reference this in the spec file so that
it gets automatically applied. Then you can do:
rpmbuild -bb
to rebuild the RPM, which you will find under
/usr/src/packages/RPMS/<arch>/ and
rpmbuild -bs
to rebuild the SRPM.
To get the whole story, search for a tutorial on using rpm to build
packages (sorry, don’t have any bookmark to suggest to you).