Summary: | Partitionmanager fails to get root privileges with latest kpmcore | ||
---|---|---|---|
Product: | [Applications] partitionmanager | Reporter: | Daimonion <pejakm> |
Component: | general | Assignee: | Andrius Štikonas <andrius> |
Status: | RESOLVED FIXED | ||
Severity: | major | ||
Priority: | NOR | ||
Version: | 3.0 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/kpmcore/13c063a1500c34b33b25a8008394af2cb65534ac | Version Fixed In: | kpmcore 3.1.2 |
Description
Daimonion
2017-07-04 13:50:55 UTC
Hi, I probably need a bit more info. So far I don't understand why it wouldn't work :( Do you use separate root account with a separate password, or ir root account disabled and you use user password? By the way feel free to join #kde-devel or #calamares on FreeNode IRC to discuss it. > Do you use separate root account with a separate password Yes. > By the way feel free to join #kde-devel Will do. ok, what happens is getlogin() function fails to obtain a username, returns an empty pointer and then KDE Partition Manager crashes on nullptr dereference. We need to add a check in kpmcore. But I wonder why getlogin() fails. Is Arch/Parabola doing something strange with glibc? Git commit 13c063a1500c34b33b25a8008394af2cb65534ac by Andrius Štikonas. Committed on 04/07/2017 at 20:07. Pushed by stikonas into branch 'master'. Fix a possible null pointer dereference. On some systems getlogin() function might fail to obtain user name. For now just check whether pointer is nullptr. In that case suspending plasma device automounter would not work but at least we will not crash. In future it might make sense to try to use other methods of obtaining login name, such as running "who am i". M +8 -2 src/core/operationrunner.cpp https://commits.kde.org/kpmcore/13c063a1500c34b33b25a8008394af2cb65534ac |