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

Use shadow tools in users client #349

Merged
merged 140 commits into from
Nov 12, 2021
Merged

Use shadow tools in users client #349

merged 140 commits into from
Nov 12, 2021

Conversation

joseivanlopez
Copy link
Contributor

@joseivanlopez joseivanlopez commented Oct 19, 2021

Adapts YaST users client to use the shadow tools for performing changes into the system.

NOTE: this PR is only about merging the accumulated work. Everything has been already reviewed and manually tested.

joseivanlopez and others added 30 commits September 15, 2021 15:23
Co-authored-by: David Díaz <1691872+dgdavid@users.noreply.github.com>
Add reader from Users module
Co-authored-by: David Díaz González <dgonzalez@suse.de>
Co-authored-by: David Díaz González <dgonzalez@suse.de>
Co-authored-by: Ancor Gonzalez Sosa <ancor@suse.de>
- User.create_system
- User#default_home
dgdavid and others added 10 commits November 2, 2021 10:46
Using Yast::Execute.on_target! to ensure the check is done against right
path in both, installation and running system.
Because it looks more like a use-case for the target agent than one for
Yast::Execute.

See #352 (comment)
Fix check for user home existence
Read home permissions and root aliases
As it is no longer supported by YaST, it makes no sense to pollute the
profile with <group_passsord> and <encrypted> tags in group sections.
As it is no longer supported by YaST, it makes no sense to still trying
to import neither, <group_passsord> nor <encrypted> group attributes
dgdavid and others added 8 commits November 9, 2021 16:14
The Users module was not reseting its internal data structure for
removed elements after each write action.

With previous code writing the /etc/passwd and /etc/groups files
directly, this was not a problem. It simply didn't write the "deleted"
elements. Now that new code is running a "userdel" and "groupdel"
commands to remove them, an error for the first previously deleted
element is prompted after running a "Write Changes Now" action.

Reseting "removed" lists internally at the end of each #Write action
fixes the problem.
Flush deleted users and groups after each write
Copy link
Contributor

@ancorgs ancorgs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. As mentioned, all individuals commit should already be reviewed, so I only checked the changes to the packages directory.

@dgdavid dgdavid merged commit ec5f94a into master Nov 12, 2021
@dgdavid dgdavid deleted the y2users branch November 12, 2021 12:12
@yast-bot
Copy link
Contributor

✔️ Internal Jenkins job #29 successfully finished
✔️ Created IBS submit request #258355

@yast-bot
Copy link
Contributor

✔️ Public Jenkins job #67 successfully finished
✔️ Created OBS submit request #931051

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

Successfully merging this pull request may close these issues.

None yet

6 participants