Results 1 to 9 of 9

Thread: Adding RNFR/RNTO to tivoftpd

  1. #1
    Join Date
    Dec 2006
    Posts
    55

    Adding RNFR/RNTO to tivoftpd

    It finally got the better of me that tivoftpd doesn't allow you to rename files. I've modified the latest source I could find and added RNFR and RNTO commands.

    Attached is the modded prog compiled for PowerPC (Series 1). Source is attached if you want to compile for Mips.
    Attached Files Attached Files
    Tivo since 2002. UK S1 + 1TB SATA. ex-TAM (tenner a month). Virgin Media not available here.

  2. #2
    Join Date
    Mar 2005
    Posts
    233
    spitfires,

    The latest tivoftpd source code is here. The version you patched is based on oftpd 0.1.3. The new version is based on oftpd 0.3.8. The new version includes multithreading, honors connection limits, and fixes issues related to the slow directory listings. I also added inetd support amd disabled TYPE_ASCII transfers.

    If you are interested in patching that version, I will compile it for mips and add the ppc version to it. Thanks for the update.
    Last edited by jkozee; 07-30-2012 at 10:13 PM.

  3. #3
    Join Date
    Dec 2006
    Posts
    55
    Hi,
    Which ppc compiler are you using? I get fatal errors compiling your code:
    Code:
    /tivo/tivodev/root/bin/gcc -DHAVE_CONFIG_H -I. -Wall -g -O2 -D_REENTRANT -D_THREAD_SAFE -c file_list.c
    In file included from file_list.c:28:
    daemon_assert.h:22: parse error before `?'
    daemon_assert.h:22: stray '\' in program
    file_list.c: In function `file_nlst':
    file_list.c:85: stray '\' in program
    file_list.c:86: stray '\' in program
    file_list.c:87: stray '\' in program
    file_list.c: In function `file_list':
    file_list.c:170: stray '\' in program
    file_list.c:171: stray '\' in program
    file_list.c:172: stray '\' in program
    file_list.c: In function `fdprintf':
    file_list.c:372: stray '\' in program
    file_list.c:373: stray '\' in program
    file_list.c:376: warning: implicit declaration of function `vsnprintf'
    file_list.c: In function `skip_ls_options':
    file_list.c:402: stray '\' in program
    file_list.c:431: stray '\' in program
    file_list.c: At top level:
    file_list.c:344: warning: `is_valid_dir' defined but not used
    make: *** [file_list.o] Error 1
    Tivo since 2002. UK S1 + 1TB SATA. ex-TAM (tenner a month). Virgin Media not available here.

  4. #4
    Join Date
    Mar 2005
    Posts
    233
    Sorry, I don't have a cross compiler setup for ppc, just mips. I was offering to compile the mips version and add your compiled ppc version to the distribution.

  5. #5
    Join Date
    Dec 2006
    Posts
    55
    Right got it I'm busy for the next couple of days (got to do some paid work!) - I'll try and have a play in a few days' time
    Tivo since 2002. UK S1 + 1TB SATA. ex-TAM (tenner a month). Virgin Media not available here.

  6. #6
    Join Date
    Mar 2005
    Posts
    233
    Sorry, had I not missed the word ADD in the previous post, my intent may have been more apparent.

    I ported your changes to the latest tivoftpd and posted a new version with the source and mips binaries. I had a quick go at compiling for ppc, but ran into problems and out of time. I wasn't able to reproduce the errors you posted, but ran into similar errors if I tried to compile without generating a new config.h file. Make sure you extract the original source (oftpd-0.3.7) and run configure on it to generatel a config.h file that matches your environment. Copy that into the src direcrtory and start from there. I ran into problems with the af_portability.h file. I think removing the INET6 and allowing for only HAVE_NEW_SS_FAMILY might be worth looking at. I ran into some "dereferencing pointer to incomplete type" errors that I believe came from the redefinition of the structs in af_portability.h. Not sure if it will help, but thought I'd mention it.

  7. #7
    Join Date
    Dec 2006
    Posts
    55

    Cool, thanks for the pointers ('scuse the pun!). I'll post future replies over here

  8. #8
    Join Date
    Mar 2005
    Posts
    233
    I had another look last night, and it looks like the ss_family is not portable. I replaced them with AF_INET. However, the new version is multithreaded using prthred and I'm not sure if that will port to ppc. The old version used fork. That may be more appropriate on the ppc. Let me know if you have any luck. In the mean time, I will link to this thread for those looking for S1/PPC version.

  9. #9
    Join Date
    Dec 2006
    Posts
    55
    Thanks. I had a little play with it this afternoon and I couldn't get it to compile either. I think i agree with you that it's probably not going to work with the ppc compiler, so I shall stick with the fork version for ppc.
    Tivo since 2002. UK S1 + 1TB SATA. ex-TAM (tenner a month). Virgin Media not available here.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •