Bug 3921 - %post fails to add xguest to /etc/ssh/denyusers if this file does not exist yet
Summary: %post fails to add xguest to /etc/ssh/denyusers if this file does not exist yet
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 1
Hardware: i586 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Remco Rijnders
QA Contact:
URL:
Whiteboard:
Keywords: Security
Depends on:
Blocks: 4650
  Show dependency treegraph
 
Reported: 2011-12-29 19:41 CET by Frederik Himpe
Modified: 2012-09-07 16:32 CEST (History)
6 users (show)

See Also:
Source RPM: xguest
CVE:
Status comment:


Attachments
Proposed work around to ensure we always end up with xguest in denyusers file when installed (2.59 KB, patch)
2012-02-29 17:32 CET, Remco Rijnders
Details | Diff

Description Frederik Himpe 2011-12-29 19:41:27 CET
From a fresh cauldron install.log:

grep: /etc/ssh/denyusers: No such file or directory
xguest-1.0.10-1.mga2.noarch

The result was that after installation, /etc/ssh/denyusers was empty, which might be a serious security risk.

(and please make guest account activation during installation opt-in instead of opt-out. I do not know of any other OS enabling a guest user by default.)
Comment 1 Manuel Hiebel 2011-12-29 22:26:54 CET
Hi, thanks for reporting this bug.
As there is no maintainer for this package I added the committers in CC.

/etc/ssh/denyusers is in openssh-server
see http://svnweb.mageia.org/packages?view=revision&revision=188774

(Please set the status to 'assigned' if you are working on it)

CC: (none) => ennael1, mageia

Remco Rijnders 2012-02-27 08:59:51 CET

CC: (none) => remco

Remco Rijnders 2012-02-29 08:35:42 CET

Assignee: bugsquad => remco

Remco Rijnders 2012-02-29 08:36:00 CET

Status: NEW => ASSIGNED

Comment 2 Damien Lallement 2012-02-29 17:18:24 CET
I don't understand why you want "xguest" to create "/etc/ssh/denyusers" if not available (so "openssh" not installed).
If you install openssh next, your "/etc/ssh/denyusers" file will be renamed "/etc/ssh/denyusers.rpmsave" so won't be used...
I made the modification but not commited for now. Why not adding this in "openssh" as "/etc/ssh/denyusers" is created by this pakage?

Status: ASSIGNED => NEW

Comment 3 Remco Rijnders 2012-02-29 17:30:57 CET
Damien,

Attached my proposal for fixing this issue (I had assigned it to myself before I saw you are listed as the xguest maintainer now).

Your thoughts on it are appreciated as it's been suggested that using file triggers for this might be suboptimal. I personally think the attached patch is a good way to deal with this and to prevent us from leaving the backdoor wide open by accident.

I also note that the issue is present in 1, but the attached patch has only been tested by me on Cauldron.

Keywords: (none) => Security
Version: Cauldron => 1

Comment 4 Remco Rijnders 2012-02-29 17:32:51 CET
Created attachment 1659 [details]
Proposed work around to ensure we always end up with xguest in denyusers file when installed
Remco Rijnders 2012-03-10 14:13:01 CET

Blocks: (none) => 4650

Manuel Hiebel 2012-03-10 14:57:49 CET

Priority: Normal => release_blocker

Comment 5 Pascal Terjan 2012-03-22 23:12:19 CET
That would work but wouldn't it be simpler to add it as a package trigger?

CC: (none) => pterjan

Comment 6 Remco Rijnders 2012-03-23 05:03:54 CET
pterjan: You are probably right... and am happy to redo the patch I worked on if you can provide me with a pointer to the concept. I did find and use https://wiki.mageia.org/en/RPM_filetriggers while working on the proposed patch, but couldn't find a page on package triggers.
Comment 7 Pascal Terjan 2012-03-23 09:34:46 CET
http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch10s02.html

http://rpm.org/api/4.4.2.2/triggers.html

It would give something like:

%triggerin -- openssh-server
if ! grep -q xguest /etc/ssh/denyusers; then
  echo xguest >> /etc/ssh/denyusers
fi
Comment 8 Remco Rijnders 2012-03-27 17:22:42 CEST
@pterjan: Thank you very kindly for your help with this.

@pterjan/coincoin: Can you please review the change in cauldron SVN and if in agreement, submit it?
Comment 9 Guillaume Rousse 2012-03-28 21:55:43 CEST
Just submited.

CC: (none) => guillomovitch

Comment 10 Manuel Hiebel 2012-04-25 23:02:07 CEST
Is this bug also valid for cauldron ?
Comment 11 Guillaume Rousse 2012-05-02 22:12:17 CEST
A fix has been pushed to cauldron more than a month ago, without feedback. And it's definitively not a critical issue.

Priority: release_blocker => Normal
Severity: major => normal

Comment 12 Marja Van Waes 2012-07-06 15:06:03 CEST
Please look at the bottom of this mail to see whether you're the assignee of this  bug, if you don't already know whether you are.


If you're the assignee:

We'd like to know for sure whether this bug was assigned correctly. Please change status to ASSIGNED if it is, or put OK on the whiteboard instead.

If you don't have a clue and don't see a way to find out, then please put NEEDHELP on the whiteboard.

Please assign back to Bug Squad or to the correct person to solve this bug if we were wrong to assign it to you, and explain why.

Thanks :)

**************************** 

@ the reporter and persons in the cc of this bug:

If you have any new information that wasn't given before (like this bug being valid for another version of Mageia, too, or it being solved) please tell us.

@ the reporter of this bug

If you didn't reply yet to a request for more information, please do so within two weeks from now.

Thanks all :-D
Remco Rijnders 2012-07-21 07:13:07 CEST

Status: NEW => ASSIGNED

Comment 13 Thierry Vignaud 2012-09-07 16:32:39 CEST
Fixed in mga2. There won't be a backport for mga1 (mga1 users should upgrade to mga2)

Status: ASSIGNED => RESOLVED
CC: (none) => thierry.vignaud
Resolution: (none) => FIXED


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