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

Mihai Moldovan <[email protected]>
Newsgroups gmane.comp.sysutils.backup.dar.support
Message-ID <[email protected]>
* On 5/3/21 12:42 AM, imschmeg wrote:
> On Sun, 2 May 2021 22:51:14 +0200
> Is there any way to override the value dar uses in place of
> UNIX_PATH_MAX?

If you really want to go ahead and try it yourself, there are quite some places
where dar defines this macro, but only one place where it's actually being used:

src/libdar/filesystem_hard_link_write.cpp:
strncpy(addr.sun_path, name, UNIX_PATH_MAX - 1);
src/libdar/filesystem_hard_link_write.cpp:
addr.sun_path[UNIX_PATH_MAX - 1] = '\0';

So, if you feel brave, modify the source code, rebuild dar and hope that
whatever you did is compatible with your system.


> It seems that it isn't defined in Debian.

But it is. See /usr/include/linux/un.h, part of linux-libc-dev.


> This is just in case I hit this issue again with backups of this kind
> of encrypted file system, where I have no control over pathname length.

Likely not worth the hassle. You can still skip unrestorable files and
attributes manually or even automatically, right?



Mihai
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.