Re: error restoring Unix socket ... path too long to be stored properly

Denis Corbin <[email protected]>
Newsgroups gmane.comp.sysutils.backup.dar.support
Message-ID <[email protected]>
On 02/05/2021 20:01, imschmeg wrote:
> I am getting this error during extraction of an archive of an encrypted
> file system (each file and its filename are encrypted separately,
> that's why the long jibberish filenames). The source and destination are
> the same f2fs file system on Debian stable 10.9.  The original socket
> name works, so why can't dar extract that same name?  Is this a problem
> specific to sockets?  Is it a problem with dar's understanding of the
> f2fs filesystem?  There are many other much longer pathnames in
> this backup that were extracted without issue, but this was the only
> socket.

this messages is issued by dar because the filename exceed the system
constant UNIX_PATH_MAX defined by your operating system.

The problem here is portability, not all system define such constant and
when it is not defined, libdar uses a somehow very restrictive value
that was known to work for every system.

Now I realize that this par of the code is old and things around unix
sockets may have changed. I will see how to get something more flexible
without taking the risk to break portability (not all operating systems
have the same limitations).

> 
> Also note the second error - after dar shortens the socket name to 1y,
> it ignores that when trying to set the access/mod time and instead uses
> the original longer name.

You are right. It should not restore the socket at all and trigger an
error. Trunking that was is not a good solution, I will have a look at
that too, thanks for feedback.

> 
> The extraction is via dar_static_2.16.4_x86_64_GNU_Linux.
> 
> error restoring Unix socket
> /test/extracted/tstuser/.cipher/pIfxiZMpaxuzJh30lp04iA/_gpq3AzCwhKLUb23hVclGg/mnHz8gVk8IYxO1x9oqlDDQ/1yPGRcfpLKIgzWjS526c9g,
> path too long to be stored properly, socket will be created as
> /test/extracted/tstuser/.cipher/pIfxiZMpaxuzJh30lp04iA/_gpq3AzCwhKLUb23hVclGg/mnHz8gVk8IYxO1x9oqlDDQ/1y
> instead, do you confirm? [return = YES | Esc = NO] Continuing... Error
> while restoring
> /test/extracted/tstuser/.cipher/pIfxiZMpaxuzJh30lp04iA/_gpq3AzCwhKLUb23hVclGg/mnHz8gVk8IYxO1x9oqlDDQ/1yPGRcfpLKIgzWjS526c9g
> : Cannot set last access and last modification time: No such file or
> directory
> 
> Everything but that socket cheks out:
> # diff -qr --no-dereference .cipher /home/tstuser/.cipher
> Only in
> .cipher/pIfxiZMpaxuzJh30lp04iA/_gpq3AzCwhKLUb23hVclGg/mnHz8gVk8IYxO1x9oqlDDQ:
> 1y Only in
> /home/tstuser/.cipher/pIfxiZMpaxuzJh30lp04iA/_gpq3AzCwhKLUb23hVclGg/mnHz8gVk8IYxO1x9oqlDDQ:
> 1yPGRcfpLKIgzWjS526c9g
> 
>
OpenPGP_signature (application/pgp-signature, 840 B) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.