Bug 2018697
| Summary: | shadow-utils: useradd crashes with --prefix | |||
|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | fedora.dm0 | |
| Component: | shadow-utils | Assignee: | Iker Pedrosa <ipedrosa> | |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | |
| Severity: | unspecified | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 35 | CC: | ipedrosa, pvrabec, tm | |
| Target Milestone: | --- | Keywords: | Triaged | |
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | shadow-utils-4.9-7.fc35 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 2020238 (view as bug list) | Environment: | ||
| Last Closed: | 2021-11-15 05:47:26 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 2020238 | |||
|
Description
fedora.dm0
2021-10-30 14:02:03 UTC
Can you provide the exact reproduction steps? I've tried with the following ones and it works correctly: 1- mkdir -p $HOME/custom_root/etc/ && touch $HOME/custom_root/etc/passwd 2- sudo useradd -P $HOME/custom_root user4 It doesn't seem to reproduce with an empty root, but copying in a bunch of stuff from a real system causes it:
[root@buildroot ~]# rm -fr /tmp/newroot && mkdir -p /tmp/newroot/etc && cp -at /tmp/newroot/etc /etc/{passwd,group,sub[ug]id,gshadow,shadow,login.defs,default}
[root@buildroot ~]# useradd --prefix /tmp/newroot --groups=wheel --create-home --password= test
free(): invalid pointer
Aborted (core dumped)
Apparently openSUSE hit this as well and backported the upstream commit: https://build.opensuse.org/package/view_file/openSUSE:Factory/shadow/shadow-fix-sigabrt.patch
Thanks for the steps! I'll include this in Fedora soon. FEDORA-2021-7a723060da has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-7a723060da FEDORA-2021-7a723060da has been pushed to the Fedora 35 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-7a723060da` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-7a723060da See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2021-2709419aea has been pushed to the Fedora 35 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-2709419aea` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-2709419aea See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2021-2709419aea has been pushed to the Fedora 35 stable repository. If problem still persists, please make note of it in this bug report. |