With latest kpmcore (3.1.1, Arch Linux packages) partitionmanager (both 3.1.1 and 3.1.0 versions) fails to get root privileges and cannot apply any action. I have rebuilt kpmcore with these commits reversed: 1. https://github.com/KDE/kpmcore/commit/9252bc615686830615c22c32a63b004c723ce828 2. https://github.com/KDE/kpmcore/commit/63b5c8c34cf257d29fb8e67b41da7b606b32aec0 and it now works.
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