Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

authselect-1.1-6.fc32 seems unable to restore the default configuration #197

Closed
fcami opened this issue Feb 7, 2020 · 4 comments
Closed

Comments

@fcami
Copy link

fcami commented Feb 7, 2020

I have two backups:

# authselect backup-list
2020-02-07-22-33-43.M8fOg6 (created at Fri 07 Feb 2020 11:33:43 PM CET)
2020-02-07-22-38-28.Uukas2 (created at Fri 07 Feb 2020 11:38:28 PM CET)

the first one is a backup of the default configuration done in rawhide (authselect-1.1-6.fc32.x86_64).
Trying to restore it fails:

[error] Unable to restore [2020-02-07-22-33-43.M8fOg6] [2]: No such file or directory
Unable to restore backup [2020-02-07-22-33-43.M8fOg6] [2]: No such file or directory

Using strace, we see it successively choke on:

openat(AT_FDCWD, "/var/lib/authselect/backups/2020-02-07-22-33-43.M8fOg6/dconf-db", O_RDONLY) = -1 ENOENT (No such file or directory)

and:

openat(AT_FDCWD, "/var/lib/authselect/backups/2020-02-07-22-33-43.M8fOg6/dconf-locks", O_RDONLY) = -1 ENOENT (No such file or directory)

Simply creating empty files:

# touch /var/lib/authselect/backups/2020-02-07-22-33-43.M8fOg6/dconf-db
# touch /var/lib/authselect/backups/2020-02-07-22-33-43.M8fOg6/dconf-locks

makes it work:

# authselect backup-restore 2020-02-07-22-33-43.M8fOg6

and the backuped nsswitch is now identical to the original:

config]# md5sum nsswitch.conf /etc/nsswitch.conf
5cc1a8341dbebe35bab636912a0e4b47  nsswitch.conf
5cc1a8341dbebe35bab636912a0e4b47  /etc/nsswitch.conf

from the FreeIPA bug report

If you need any more information please let me know.

pbrezina referenced this issue Feb 12, 2020
…guration

Configuration that was not previously generated by authselect may not contain all
the files (usually dconf configuration). This should not be treated as error
but rather the files should be unlinked from the file system.

Resolves:
https://github.com/pbrezina/authselect/issues/197
@pbrezina
Copy link
Member

@pbrezina
Copy link
Member

pbrezina referenced this issue Feb 17, 2020
…guration

Configuration that was not previously generated by authselect may not contain all
the files (usually dconf configuration). This should not be treated as error
but rather the files should be unlinked from the file system.

Resolves:
https://github.com/pbrezina/authselect/issues/197
@pbrezina pbrezina added this to the authselect-1.2 milestone Feb 17, 2020
@pbrezina
Copy link
Member

  • master
    • c8fa709 - backup-list: return empty array if directory does not exist
    • 59149a3 - backup: do not unlink dangerous missing files
    • 8a3ea7d - backup: remove authselect.conf when restoring non-authselect configuration
    • 5165e5e - backup: remove non-existing files when restoring non-authselect configuration

@fcami
Copy link
Author

fcami commented Feb 17, 2020

Hi @pbrezina the build at https://koji.fedoraproject.org/koji/taskinfo?taskID=41467298 fixes the issue on a non-FreeIPA rawhide reproducer at least. Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants