Bug#983861: k3b: Permissions of external program should be of group "cdrom" and not "operator"
Hi,
not that I am an expert, and cd burning is anyway only for maniacs (like
me!!!) who want to get into contact with whom-who-must-not-be-named.
> With k3b, when wanting to set the external program permissions, it wants to
> set them with user "operator" instead of "cdrom" which may be more adequate
> while (::group *g = ::getgrent()) {
> const QString groupName = QString::fromLocal8Bit(g->gr_name);
> - if (groupName == "cdrom" ||
> - groupName == "optical" ||
> - groupName == "operator" ) {
> + if (groupName == "cdrom") {
> m_permissionModel->setBurningGroup(groupName);
> }
> }
Well, the original code is rather bad indeed, because it relies on the
order of groups returned by getgrent, and picks the *last* available
one. In your case, if you have an "operator" group, it will be used.
I am not sure, maybe this is intended, but I guess there should be
either a break out of the loop after the first groupname is found,
or something else.
Best
Norbert
--
PREINING Norbert https://www.preining.info
Fujitsu Research Labs + IFMGA Guide + TU Wien + TeX Live + Debian Dev
GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
Reply to: