Thread: translation_file not saved in case of lstat problem
Brought to you by:
thesun
From: <sou...@co...> - 2018-09-16 14:54:46
|
Dear, I' running rsyncrypto with option --name-encrypt=translation_file to encrypt filenames. The file translation_file is in most caes updated at the end of the run. Currently, the translation_file is not updated at the end of the run. There is an error message on 'lstat failed(/dir/dir/filename): No such file or directory' The error is caused by the fact that between rsyncrypto reading the directory and then attempting to access the file, the file has been deleted. So I end up with many encrypted files, but no updated translation_file. How can it be forced that translation_file is written out, even in the case of a lstat error ? regards, Johan |
From: Shachar S. <sh...@sh...> - 2018-09-17 19:50:44
|
<html style="direction: ltr;"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style> </head> <body bidimailui-charset-is-forced="true" style="direction: ltr;" text="#000000" bgcolor="#FFFFFF"> <div class="moz-cite-prefix">Hello Johan,<br> <br> On 16/09/18 17:36, <a class="moz-txt-link-abbreviated" href="mailto:sou...@co...">sou...@co...</a> wrote:<br> </div> <blockquote type="cite" cite="mid:35c...@co...">Dear, <br> <br> I' running rsyncrypto with option --name-encrypt=translation_file to encrypt filenames. The file translation_file is in most caes updated at the end of the run. <br> <br> Currently, the translation_file is not updated at the end of the run. There is an error message on 'lstat failed(/dir/dir/filename): No such file or directory' <br> <br> The error is caused by the fact that between rsyncrypto reading the directory and then attempting to access the file, the file has been deleted. <br> <br> So I end up with many encrypted files, but no updated translation_file. How can it be forced that translation_file is written out, even in the case of a lstat error ? <br> <br> regards, <br> <br> Johan <br> </blockquote> It sounds like a bug. I will have to look into it.<br> <br> Sadly, I'm in the middle of an extremely busy time right now, so it will take me a little while. Please, and I do mean it, if you do not hear from me within a week, please please please send me (to the list) a reminder.<br> <br> Thank you for your report,<br> Shachar<br> </body> </html> |
From: <sou...@co...> - 2018-09-25 06:14:07
|
Hello Shachar, as requested, reminder send to the list regards, Johan On 17/09/18 21:32, Shachar Shemesh wrote: > Hello Johan, > > On 16/09/18 17:36, sou...@co... wrote: >> Dear, >> >> I' running rsyncrypto with option --name-encrypt=translation_file to >> encrypt filenames. The file translation_file is in most caes updated >> at the end of the run. >> >> Currently, the translation_file is not updated at the end of the run. >> There is an error message on 'lstat failed(/dir/dir/filename): No >> such file or directory' >> >> The error is caused by the fact that between rsyncrypto reading the >> directory and then attempting to access the file, the file has been >> deleted. >> >> So I end up with many encrypted files, but no updated >> translation_file. How can it be forced that translation_file is >> written out, even in the case of a lstat error ? >> >> regards, >> >> Johan > It sounds like a bug. I will have to look into it. > > Sadly, I'm in the middle of an extremely busy time right now, so it > will take me a little while. Please, and I do mean it, if you do not > hear from me within a week, please please please send me (to the list) > a reminder. > > Thank you for your report, > Shachar > > > > > _______________________________________________ > Rsyncrypto-devel mailing list > Rsy...@li... > https://lists.sourceforge.net/lists/listinfo/rsyncrypto-devel |
From: Shachar S. <sh...@sh...> - 2018-10-04 03:20:18
|
<html style="direction: ltr;"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style> </head> <body bidimailui-charset-is-forced="true" style="direction: ltr;" text="#000000" bgcolor="#FFFFFF"> <div class="moz-cite-prefix">On 25/09/18 09:13, <a class="moz-txt-link-abbreviated" href="mailto:sou...@co...">sou...@co...</a> wrote:<br> </div> <blockquote type="cite" cite="mid:9e3...@co..."> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <p>Hello Shachar,</p> <p>as requested, reminder send to the list</p> </blockquote> <p>Thank you. Working on it.</p> <p><br> </p> <p>Shachar<br> </p> <br> </body> </html> |
From: Shachar S. <sh...@sh...> - 2018-10-05 18:48:17
|
<html style="direction: ltr;"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style> </head> <body bidimailui-charset-is-forced="true" style="direction: ltr;" text="#000000" bgcolor="#FFFFFF"> <div class="moz-cite-prefix">On 16/09/18 17:36, <a class="moz-txt-link-abbreviated" href="mailto:sou...@co...">sou...@co...</a> wrote:<br> </div> <blockquote type="cite" cite="mid:35c...@co...">Dear, <br> <br> I' running rsyncrypto with option --name-encrypt=translation_file to encrypt filenames. The file translation_file is in most caes updated at the end of the run. <br> <br> Currently, the translation_file is not updated at the end of the run. There is an error message on 'lstat failed(/dir/dir/filename): No such file or directory' <br> <br> The error is caused by the fact that between rsyncrypto reading the directory and then attempting to access the file, the file has been deleted. <br> <br> So I end up with many encrypted files, but no updated translation_file. How can it be forced that translation_file is written out, even in the case of a lstat error ? <br> <br> regards, <br> <br> Johan <br> <br> </blockquote> Hello Johan,<br> <br> I'm trying to wrap my brains about the sequence of events. Can you give me reproduction instructions to this problem? What steps do I need to take in order to see it on my system?<br> <br> Thanks,<br> Shachar<br> </body> </html> |
From: <sou...@co...> - 2018-10-06 08:52:01
|
Hello Shachar, hereby a scenario to reproduce many times. I've created a set-up where you can reproduce numerous time, very quickly. In scenario, I have a huge number of files in a directory, when rsyncrypto is running, I suspend with Ctrl-Z, delete all files in the directory, then continue unsuspending rsyncrypto by bringing to the foreground with 'fg' command. To be able to reproduce time-after-time, I'm keeping a copy of the original big directory in repo-source-dir-copy Set-up of environment in a test-directory: mkdir repo-source-dir mkdir repo-encrypted-dir mkdir SRCDIR.KEYS dd bs=4k count=2 if=/dev/urandom of=./repo-source-dir-copy/orig-file let a=1 cd repo-source-dir-copy while true; do cp orig-file copy-file-$a; let a=a+1; echo $a; done # interrupt when sufficient files created, like 600-700 # cd .. dd bs=4k count=2 if=/dev/urandom of=./repo-source-dir/orig-file2 dd bs=4k count=2 if=/dev/urandom of=./repo-source-dir/orig-file3 ./rsyncrypto -vvr --changed --trim=0 \ --name-encrypt=./repo-encrypt-filename --ne-nesting=3 \ ./repo-source-dir \ ./repo-encrypted-dir \ ./SRCDIR.KEYS \ ./rckey.crt # # now 2 files in repo-encrypt-filename # # strings repo-encrypt-filename # /73B2387C10C76099CDADBC8BE8EB908B ./repo-source-dir/orig-file3 # /B06C02944DC76FCC72B038EEB0FCA02E ./repo-source-dir/orig-file2 ============= Then to reproduce the problem: # # add many files to repo-source-dir # ln ./repo-source-dir-copy/* ./repo-source-dir # # execute new backup # ./rsyncrypto -vvr --changed --trim=0 \ --name-encrypt=./repo-encrypt-filename --ne-nesting=3 \ ./repo-source-dir \ ./repo-encrypted-dir \ ./SRCDIR.KEYS \ ./rckey.crt # # suspend when running by ctrl-Z # # Encrypting ./repo-source-dir/copy-file-753 # Encrypting ./repo-source-dir/copy-file-629 # ^Z # [1]+ Stopped ./rsyncrypto -vvr --changed --trim=0 --name-encrypt=./repo-encrypt-filename --ne-nesting=3 ./repo-source-dir ./repo-encrypted-dir ./SRCDIR.KEYS ./rckey.crt # rm repo-source-dir/* # # bring back to foreground # # fg # # lstat failed(./repo-source-dir/copy-file-12): No such file or directory # lstat failed(./repo-source-dir/copy-file-178): No such file or directory # lstat failed(./repo-source-dir/copy-file-296): No such file or directory # lstat failed(./repo-source-dir/copy-file-70): No such file or directory # lstat failed(./repo-source-dir/copy-file-456): No such file or directory # lstat failed(./repo-source-dir/copy-file-580): No such file or directory # lstat failed(./repo-source-dir/copy-file-606): No such file or directory # Exit code delayed from previous errors # # check number of filename in repo-encrypt-filename # # strings repo-encrypt-filename # /73B2387C10C76099CDADBC8BE8EB908B ./repo-source-dir/orig-file3 # /B06C02944DC76FCC72B038EEB0FCA02E ./repo-source-dir/orig-file2 # ============================== If you need to test again, start over at 'ln' command regards, Johan On 05/10/18 20:48, Shachar Shemesh wrote: > On 16/09/18 17:36, sou...@co... wrote: >> Dear, >> >> I' running rsyncrypto with option --name-encrypt=translation_file to >> encrypt filenames. The file translation_file is in most caes updated >> at the end of the run. >> >> Currently, the translation_file is not updated at the end of the run. >> There is an error message on 'lstat failed(/dir/dir/filename): No >> such file or directory' >> >> The error is caused by the fact that between rsyncrypto reading the >> directory and then attempting to access the file, the file has been >> deleted. >> >> So I end up with many encrypted files, but no updated >> translation_file. How can it be forced that translation_file is >> written out, even in the case of a lstat error ? >> >> regards, >> >> Johan >> > Hello Johan, > > I'm trying to wrap my brains about the sequence of events. Can you > give me reproduction instructions to this problem? What steps do I > need to take in order to see it on my system? > > Thanks, > Shachar > > > > > _______________________________________________ > Rsyncrypto-devel mailing list > Rsy...@li... > https://lists.sourceforge.net/lists/listinfo/rsyncrypto-devel |
From: Shachar S. <sh...@sh...> - 2018-10-07 07:40:42
|
<html style="direction: ltr;"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style> </head> <body bidimailui-charset-is-forced="true" style="direction: ltr;" text="#000000" bgcolor="#FFFFFF"> <div class="moz-cite-prefix">On 06/10/18 11:51, <a class="moz-txt-link-abbreviated" href="mailto:sou...@co...">sou...@co...</a> wrote:<br> </div> <blockquote type="cite" cite="mid:899...@co..."> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <p>Hello Shachar,</p> <p>hereby a scenario to reproduce many times. I've created a set-up where you can reproduce numerous time, very quickly.</p> <p>In scenario, I have a huge number of files in a directory, when rsyncrypto is running, I suspend with Ctrl-Z, delete all files in the directory, then continue unsuspending rsyncrypto by bringing to the foreground with 'fg' command.</p> <p>To be able to reproduce time-after-time, I'm keeping a copy of the original big directory in repo-source-dir-copy<br> </p> </blockquote> <p>Hello Johan,</p> <p><br> </p> <p>I understand the scenario you describe. I just don't understand how rsyncrypto is supposed to survive it.</p> <p><br> </p> <p>As with many other programs, rsyncrypto expects the files it needs not to shift around <i>while</i> it is manipulating them.</p> <p><br> </p> <p>Essentially, you are asking that if you delete the file rsyncrypto is creating, that it not get deleted.</p> <p><br> </p> <p>Am I missing something? Can you explain the real wold aim you are trying to achieve that causes this condition to trigger?</p> <p><br> </p> <p>Thank you,</p> <p>Shachar<br> </p> <br> </body> </html> |
From: <sou...@co...> - 2018-10-07 08:14:27
|
On 07/10/18 09:40, Shachar Shemesh wrote: > On 06/10/18 11:51, sou...@co... wrote: >> >> Hello Shachar, >> >> hereby a scenario to reproduce many times. I've created a set-up >> where you can reproduce numerous time, very quickly. >> >> In scenario, I have a huge number of files in a directory, when >> rsyncrypto is running, I suspend with Ctrl-Z, delete all files in the >> directory, then continue unsuspending rsyncrypto by bringing to the >> foreground with 'fg' command. >> >> To be able to reproduce time-after-time, I'm keeping a copy of the >> original big directory in repo-source-dir-copy >> > Hello Johan, > > > I understand the scenario you describe. I just don't understand how > rsyncrypto is supposed to survive it. > > > As with many other programs, rsyncrypto expects the files it needs not > to shift around /while/ it is manipulating them. > > > Essentially, you are asking that if you delete the file rsyncrypto is > creating, that it not get deleted. > > > Am I missing something? Can you explain the real wold aim you are > trying to achieve that causes this condition to trigger? > > > Thank you, > > Shachar > > Hello Shachar, if during a run, there are hunderds of additional files encrypted and sync, and there is one file that went missing causing the lstat error, rsyncrypto behaves this lstat error as a fatal error and doesn't update the translation file. In addition, these hundreds of additional files are now encrypted and can't be matched back to the original filename. Also at the next run, rsyncrypto will create an additional copy of these extra files. What I'm asking for is that rsyncrypto doesn't handle this as a fatal error and at the end of the run still update the translation file when the lstat error occured. I discovered the issue when running rsyncrypto on my home directory when still working on my box which causes sometimes that a file gets deleted. The problem also happens when using --filelist, if there is an error in that filelist, and there is a file that does not exist, no translation file is saved, here output of such: ./rsyncrypto -vv --changed --trim=0 --name-encrypt=./repo-encrypt-filename --ne-nesting=3 --filelist=file-list . ./repo-encrypted-dir ./SRCDIR.KEYS ./rckey.crt Encrypting file: ./repo-src-dir2/orig-file3 Encrypting file: ./repo-src-dir2/orig-file4 Error in encryption of ./repo-src-dir2/orig-file5: stat failed(././repo-src-dir2/orig-file5): No such file or directory Exit code delayed from previous errors A fix that I've found is to change the end of main.cpp to (and move declaration of rsa_key to a higher level): } catch( const rscerror &err ) { std::cerr<<err.error()<<std::endl; ret=1; if( encrypt && EXISTS(nameenc) ) { // Write the (possibly changed) filelist back to the file filemap::write_map(FILENAME(nameenc)); // Encrypt the filelist file itself file_encrypt(FILENAME(nameenc), autofd::combine_paths(FILENAME(dst), FILEMAPNAME). c_str(), autofd::combine_paths(FILENAME(key), FILEMAPNAME).c_str(), rsa_key, NULL ); } } return ret; } Probably some extra logic to be added to only write translation file in case of lstat error, not in case of other errors. regards, Johan > > > > > _______________________________________________ > Rsyncrypto-devel mailing list > Rsy...@li... > https://lists.sourceforge.net/lists/listinfo/rsyncrypto-devel |
From: Shachar S. <sh...@sh...> - 2018-10-08 03:54:31
|
<html style="direction: ltr;"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style> </head> <body bidimailui-charset-is-forced="true" style="direction: ltr;" text="#000000" bgcolor="#FFFFFF"> <div class="moz-cite-prefix">I want to clarify the report. You are not complaining about someone erasing the name translation file during encryption. You are complaining about someone erasing one of the <b>source</b> files. Is that correct?<br> <br> Erasing the name translation file or one of the encrypted files during encryption is not a bug rsyncrypto is supposed to handle. No one should be touching those during the encryption phase. Erasing a source file is something that rsyncrypto should, absolutely, be able to handle without failing outright.<br> <br> Thank you,<br> Shachar<br> <br> On 07/10/18 11:14, <a class="moz-txt-link-abbreviated" href="mailto:sou...@co...">sou...@co...</a> wrote:<br> </div> <blockquote type="cite" cite="mid:e8d...@co..."> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <p>On 07/10/18 09:40, Shachar Shemesh wrote: </p> <blockquote type="cite"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style> <div class="moz-cite-prefix">On 06/10/18 11:51, <a class="moz-txt-link-abbreviated" href="mailto:sou...@co..." moz-do-not-send="true">sou...@co...</a> wrote:<br> </div> <blockquote type="cite" cite="mid:899...@co..."> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <p>Hello Shachar,</p> <p>hereby a scenario to reproduce many times. I've created a set-up where you can reproduce numerous time, very quickly.</p> <p>In scenario, I have a huge number of files in a directory, when rsyncrypto is running, I suspend with Ctrl-Z, delete all files in the directory, then continue unsuspending rsyncrypto by bringing to the foreground with 'fg' command.</p> <p>To be able to reproduce time-after-time, I'm keeping a copy of the original big directory in repo-source-dir-copy<br> </p> </blockquote> <p>Hello Johan,</p> <p><br> </p> <p>I understand the scenario you describe. I just don't understand how rsyncrypto is supposed to survive it.</p> <p><br> </p> <p>As with many other programs, rsyncrypto expects the files it needs not to shift around <i>while</i> it is manipulating them.</p> <p><br> </p> <p>Essentially, you are asking that if you delete the file rsyncrypto is creating, that it not get deleted.</p> <p><br> </p> <p>Am I missing something? Can you explain the real wold aim you are trying to achieve that causes this condition to trigger?</p> <p><br> </p> <p>Thank you,</p> <p>Shachar<br> </p> <br> </blockquote> Hello Shachar, <p>if during a run, there are hunderds of additional files encrypted and sync, and there is one file that went missing causing the lstat error, rsyncrypto behaves this lstat error as a fatal error and doesn't update the translation file.</p> <p>In addition, these hundreds of additional files are now encrypted and can't be matched back to the original filename. Also at the next run, rsyncrypto will create an additional copy of these extra files.</p> <p><br> </p> <p>What I'm asking for is that rsyncrypto doesn't handle this as a fatal error and at the end of the run still update the translation file when the lstat error occured.</p> <p><br> </p> <p>I discovered the issue when running rsyncrypto on my home directory when still working on my box which causes sometimes that a file gets deleted.</p> <p><br> </p> <p>The problem also happens when using --filelist, if there is an error in that filelist, and there is a file that does not exist, no translation file is saved, here output of such:</p> <p><br> </p> <p> ./rsyncrypto -vv --changed --trim=0 --name-encrypt=./repo-encrypt-filename --ne-nesting=3 --filelist=file-list . ./repo-encrypted-dir ./SRCDIR.KEYS ./rckey.crt<br> Encrypting file: ./repo-src-dir2/orig-file3<br> Encrypting file: ./repo-src-dir2/orig-file4<br> Error in encryption of ./repo-src-dir2/orig-file5: stat failed(././repo-src-dir2/orig-file5): No such file or directory<br> Exit code delayed from previous errors<br> </p> <p><br> </p> <p>A fix that I've found is to change the end of main.cpp to (and move declaration of rsa_key to a higher level):</p> <p><br> </p> <p> } catch( const rscerror &err ) {<br> std::cerr<<err.error()<<std::endl;<br> ret=1;<br> if( encrypt && EXISTS(nameenc) ) {<br> // Write the (possibly changed) filelist back to the file<br> filemap::write_map(FILENAME(nameenc));<br> // Encrypt the filelist file itself<br> file_encrypt(FILENAME(nameenc), autofd::combine_paths(FILENAME(dst), FILEMAPNAME).<br> c_str(), autofd::combine_paths(FILENAME(key), FILEMAPNAME).c_str(), rsa_key,<br> NULL );<br> }<br> }<br> <br> return ret;<br> }<br> </p> <p><br> </p> <p>Probably some extra logic to be added to only write translation file in case of lstat error, not in case of other errors.</p> <p><br> </p> <p>regards,</p> <p>Johan<br> </p> <blockquote type="cite"> <br> <fieldset class="mimeAttachmentHeader"></fieldset> <br> <br> <fieldset class="mimeAttachmentHeader"></fieldset> <br> <pre wrap="">_______________________________________________ Rsyncrypto-devel mailing list <a class="moz-txt-link-abbreviated" href="mailto:Rsy...@li..." moz-do-not-send="true">Rsy...@li...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/rsyncrypto-devel" moz-do-not-send="true">https://lists.sourceforge.net/lists/listinfo/rsyncrypto-devel</a> </pre> </blockquote> <p><br> </p> <br> <fieldset class="mimeAttachmentHeader"></fieldset> <br> <br> <fieldset class="mimeAttachmentHeader"></fieldset> <br> <pre wrap="">_______________________________________________ Rsyncrypto-devel mailing list <a class="moz-txt-link-abbreviated" href="mailto:Rsy...@li...">Rsy...@li...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/rsyncrypto-devel">https://lists.sourceforge.net/lists/listinfo/rsyncrypto-devel</a> </pre> </blockquote> <br> </body> </html> |
From: <sou...@co...> - 2018-10-08 05:52:19
|
On 08/10/18 05:54, Shachar Shemesh wrote: > I want to clarify the report. You are not complaining about someone > erasing the name translation file during encryption. You are > complaining about someone erasing one of the *source* files. Is that > correct? > correct, this is about a *source* file that is erased while rsyncrypto is running. The other situation where there is a problem, is when the *filelist* contains a file which does not exist (which could have been caused by someone erasing the *source* file, or the filelist was badly created). > Erasing the name translation file or one of the encrypted files during > encryption is not a bug rsyncrypto is supposed to handle. No one > should be touching those during the encryption phase. Agree, that scenario is not a rsyncrypto bug, that is user error/bug. > Erasing a source file is something that rsyncrypto should, absolutely, > be able to handle without failing outright. Also I fully agree here, rsyncrypto should be able to handle this. > > Thank you, > Shachar > thank you for working and supporting this Johan > On 07/10/18 11:14, sou...@co... wrote: >> >> On 07/10/18 09:40, Shachar Shemesh wrote: >> >>> On 06/10/18 11:51, sou...@co... wrote: >>>> >>>> Hello Shachar, >>>> >>>> hereby a scenario to reproduce many times. I've created a set-up >>>> where you can reproduce numerous time, very quickly. >>>> >>>> In scenario, I have a huge number of files in a directory, when >>>> rsyncrypto is running, I suspend with Ctrl-Z, delete all files in >>>> the directory, then continue unsuspending rsyncrypto by bringing to >>>> the foreground with 'fg' command. >>>> >>>> To be able to reproduce time-after-time, I'm keeping a copy of the >>>> original big directory in repo-source-dir-copy >>>> >>> Hello Johan, >>> >>> >>> I understand the scenario you describe. I just don't understand how >>> rsyncrypto is supposed to survive it. >>> >>> >>> As with many other programs, rsyncrypto expects the files it needs >>> not to shift around /while/ it is manipulating them. >>> >>> >>> Essentially, you are asking that if you delete the file rsyncrypto >>> is creating, that it not get deleted. >>> >>> >>> Am I missing something? Can you explain the real wold aim you are >>> trying to achieve that causes this condition to trigger? >>> >>> >>> Thank you, >>> >>> Shachar >>> >>> >> Hello Shachar, >> >> if during a run, there are hunderds of additional files encrypted and >> sync, and there is one file that went missing causing the lstat >> error, rsyncrypto behaves this lstat error as a fatal error and >> doesn't update the translation file. >> >> In addition, these hundreds of additional files are now encrypted and >> can't be matched back to the original filename. Also at the next run, >> rsyncrypto will create an additional copy of these extra files. >> >> >> What I'm asking for is that rsyncrypto doesn't handle this as a fatal >> error and at the end of the run still update the translation file >> when the lstat error occured. >> >> >> I discovered the issue when running rsyncrypto on my home directory >> when still working on my box which causes sometimes that a file gets >> deleted. >> >> >> The problem also happens when using --filelist, if there is an error >> in that filelist, and there is a file that does not exist, no >> translation file is saved, here output of such: >> >> >> ./rsyncrypto -vv --changed --trim=0 >> --name-encrypt=./repo-encrypt-filename --ne-nesting=3 >> --filelist=file-list . ./repo-encrypted-dir ./SRCDIR.KEYS ./rckey.crt >> Encrypting file: ./repo-src-dir2/orig-file3 >> Encrypting file: ./repo-src-dir2/orig-file4 >> Error in encryption of ./repo-src-dir2/orig-file5: stat >> failed(././repo-src-dir2/orig-file5): No such file or directory >> Exit code delayed from previous errors >> >> >> A fix that I've found is to change the end of main.cpp to (and move >> declaration of rsa_key to a higher level): >> >> >> } catch( const rscerror &err ) { >> std::cerr<<err.error()<<std::endl; >> ret=1; >> if( encrypt && EXISTS(nameenc) ) { >> // Write the (possibly changed) filelist back to the file >> filemap::write_map(FILENAME(nameenc)); >> // Encrypt the filelist file itself >> file_encrypt(FILENAME(nameenc), >> autofd::combine_paths(FILENAME(dst), FILEMAPNAME). >> c_str(), autofd::combine_paths(FILENAME(key), >> FILEMAPNAME).c_str(), rsa_key, >> NULL ); >> } >> } >> >> return ret; >> } >> >> >> Probably some extra logic to be added to only write translation file >> in case of lstat error, not in case of other errors. >> >> >> regards, >> >> Johan >> >>> >>> >>> >>> >>> _______________________________________________ >>> Rsyncrypto-devel mailing list >>> Rsy...@li... >>> https://lists.sourceforge.net/lists/listinfo/rsyncrypto-devel >> >> >> >> >> >> >> _______________________________________________ >> Rsyncrypto-devel mailing list >> Rsy...@li... >> https://lists.sourceforge.net/lists/listinfo/rsyncrypto-devel > > > > > > _______________________________________________ > Rsyncrypto-devel mailing list > Rsy...@li... > https://lists.sourceforge.net/lists/listinfo/rsyncrypto-devel |