Bug 13249 - gparted have incorrect run script
Summary: gparted have incorrect run script
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 4
Hardware: i586 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: has_procedure advisory mga4-32-ok mga...
Keywords: Triaged, validated_update
Depends on:
Blocks:
 
Reported: 2014-04-22 15:24 CEST by Alex Loginov
Modified: 2014-05-29 09:27 CEST (History)
3 users (show)

See Also:
Source RPM: gparted-0.18.0-1.mga5.src.rpm
CVE:
Status comment:


Attachments

Description Alex Loginov 2014-04-22 15:24:29 CEST
Description of problem: gparted have incorrect run script

#!/bin/sh
if  [[ "500" != "0" ]] ; then
    /usr/bin/pkexec /usr/libexec/gparted ""
    exit 0
fi
exec /usr/libexec/gparted ""


Version-Release number of selected component (if applicable): gparted-0.18.0-1.mga5.src.rpm


How reproducible: always


Steps to Reproduce:
1. cat /usr/bin/gparted

Error in spec, must be:
cat >%{buildroot}%{_bindir}/%{name} <<EOF
#!/bin/sh
if  [[ "\$EUID" != "0" ]] ; then
    %{_bindir}/pkexec %{_libexecdir}/%{name} "\$@"
    exit \$?
fi
exec %{_libexecdir}/%{name} "\$@"
EOF

Reproducible: 

Steps to Reproduce:
Alex Loginov 2014-04-22 15:25:19 CEST

Keywords: (none) => Triaged
Assignee: bugsquad => supp

Comment 1 Manuel Hiebel 2014-04-22 16:13:02 CEST
Thomas is not really active, added colin at it seems he added this part

CC: (none) => mageia

Comment 2 Alex Loginov 2014-05-11 11:01:41 CEST
I have uploaded a updated package for Mageia 4.

Suggested advisory:
========================

Updated gparted packages fix:

- version 0.18.0
- added "\" before "$" in spec file for right creating run script /usr/bin/gparted
========================

Updated packages in core/updates_testing:
========================
gparted-0.18.0-1.mga4

Source RPMs: 
gparted-0.18.0-1.mga4.src.rpm

Version: Cauldron => 4
Assignee: supp => qa-bugs

Comment 3 claire robinson 2014-05-11 16:18:33 CEST
Can you explain, beyond the changelog, the reason for the update please Alex.

Advisories should be written in sentences and paragraphs in conversational language please.

Whiteboard: (none) => feedback

Comment 4 claire robinson 2014-05-11 16:28:49 CEST
Also if the version bump is necessary (0.16.2 -> 0.18) then the reason for that too please.
Comment 5 Alex Loginov 2014-05-11 18:01:02 CEST
If to write "$" in spec, but not "\$", then it interpreted by bs as variable, but we must have "$" in bash run script.
0.16.2 -> 0.18 is only version update.
Comment 6 claire robinson 2014-05-23 13:31:16 CEST
Removing feedback marker. Please write future advisories in plain conversational language Alex. It is used on http://advisories.mageia.org and the updates-announce mailing list so needs to be presented as information useful to a user rather than a packager.

Whiteboard: feedback => (none)

Comment 7 claire robinson 2014-05-23 16:19:40 CEST
Testing complete mga4 32 & 64

Before
------
# cat /usr/bin/gparted
#!/bin/sh
if  [[ "501" != "0" ]] ; then
    /usr/bin/pkexec /usr/libexec/gparted ""
    exit 0
fi
exec /usr/libexec/gparted ""


After
-----
# cat /usr/bin/gparted
#!/bin/sh
if  [[ "517" != "0" ]] ; then
    /usr/bin/pkexec /usr/libexec/gparted "$@"
    exit $?
fi
exec /usr/libexec/gparted "$@"


Quickly checked to see it still works.

Whiteboard: (none) => mga4-32-ok mga4-64-ok

Comment 8 claire robinson 2014-05-23 16:25:03 CEST
Advisory uploaded. Validating.

Could sysadmin please push to 4 updates

Thanks

Keywords: (none) => validated_update
Whiteboard: mga4-32-ok mga4-64-ok => advisory mga4-32-ok mga4-64-ok
CC: (none) => sysadmin-bugs

Comment 9 Alex Loginov 2014-05-23 18:40:14 CEST
QA team found incorrect run script again, fixed in gparted-0.18.0-1.1.mga4.
Needs testing again.

I have uploaded a updated package for Mageia 4.

Suggested advisory:
========================

Updated gparted packages fix:

- updated version to 0.18.0
- added "\" before "$" in spec file for right creating run script /usr/bin/gparted (run script must have variables instead of values; run script had values before an update)
========================

Updated packages in core/updates_testing:
========================
gparted-0.18.0-1.1.mga4

Source RPMs: 
gparted-0.18.0-1.1.mga4.src.rpm

Keywords: validated_update => (none)
Whiteboard: advisory mga4-32-ok mga4-64-ok => (none)

Comment 10 claire robinson 2014-05-23 19:11:39 CEST
Alex, I've no idea what this is supposed to fix.
Comment 11 claire robinson 2014-05-23 19:49:52 CEST
Guessing "517" should be a variable too.
Comment 12 Alex Loginov 2014-05-23 20:00:28 CEST
> Guessing "517" should be a variable too.
Yes.
Comment 13 claire robinson 2014-05-27 15:44:37 CEST
Testing complete mga4 64

Looks more sane..

#!/bin/sh
if  [[ "$EUID" != "0" ]] ; then
    /usr/bin/pkexec /usr/libexec/gparted "$@"
    exit $?
fi
exec /usr/libexec/gparted "$@"


Confirmed it asks for root auth when run as normal user and not when run as root.

Whiteboard: (none) => has_procedure mga4-64-ok

Comment 14 claire robinson 2014-05-27 15:54:57 CEST
Testing complete mga4 32

Advisory updated. Validating.

Could sysadmin please push to 4 updates

Thanks

Keywords: (none) => validated_update
Whiteboard: has_procedure mga4-64-ok => has_procedure advisory mga4-32-ok mga4-64-ok

Comment 15 Thomas Backlund 2014-05-29 09:27:52 CEST
Update pushed:
http://advisories.mageia.org/MGAA-2014-0124.html

Status: NEW => RESOLVED
CC: (none) => tmb
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.