Summary: | Patch to remove root's username dependencies | ||
---|---|---|---|
Product: | [I don't know] kde | Reporter: | Lucas Correia Villa Real <lucasvr> |
Component: | general | Assignee: | Unassigned bugs <unassigned-bugs-null> |
Status: | RESOLVED NOT A BUG | ||
Severity: | wishlist | CC: | nate, rakuco |
Priority: | NOR | ||
Version First Reported In: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Gets the superuser's name in a portable way |
Description
Lucas Correia Villa Real
2005-03-24 17:06:55 UTC
Created attachment 10327 [details]
Gets the superuser's name in a portable way
This patch fixes that for the KDE-Base, by replacing "root" by the portable
getpwuid() calls and by replacing "root" by "0" on shell scripts.
Some parts of KDE actually use $ADMIN_ACCOUNT when defined instead of root. I don't like the patch as it copies code around. Add a static function to kuser.h that returns the correct name and take in account what Waldo said: if (user.isEmpty()) user = ::getenv("ADMIN_ACCOUNT"); if (user.isEmpty()) user = "root"; I can see that some places still use hard-coded "root". Lucas, is it still relevant for you? Can you update the patch? Not relevant anymore. |