Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pamdir_suse to accommodate with TW pam.d move #2413

Merged
merged 2 commits into from
Nov 8, 2022

Conversation

YoukouTenhouin
Copy link
Contributor

On newer builds of openSUSE tumbleweed the path of pam.d has moved from /usr/etc/pam.d to /usr/lib/pam.d, which prevents install script to correctly guess pam rules. Updating path in mkpamrules solves the problem.

The script should still work on older SUSE systems since there's still /etc/pam.d/common-account on those, which should allow for correct rule guess.

On newer builds of openSUSE tumbleweed the path of pam.d has moved from
/usr/etc/pam.d to /usr/lib/pam.d, which prevents install script to
correctly guess pam rules. Updating path in mkpamrules solves the
problem.

The script should still work on older SUSE systems since there's
still /etc/pam.d/common-account on those, which should allow for correct
rule guess.
@@ -8,7 +8,7 @@ outfile="$3"

service="xrdp-sesman"
pamdir="/etc/pam.d"
pamdir_suse="/usr/etc/pam.d"
pamdir_suse="/usr/lib/pam.d"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a shell script, how about:-

pamdir_suse="/usr/lib/pam.d"
if [ ! -d "$pamdir_suse" ]; then
    # Pre-Tumbleweed setting
    pamdir_suse="/usr/etc/pam.d"
fi

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks for the suggestion!

@metalefty metalefty added this to the v0.9.21 milestone Nov 8, 2022
@metalefty
Copy link
Member

I think it's worth cherry-picking to v0.9 so I applied v0.9.21 milestone.

@matt335672 matt335672 merged commit 4ff968b into neutrinolabs:devel Nov 8, 2022
@matt335672
Copy link
Member

@MosakujiHokuto - thanks for your contribution!

metalefty pushed a commit to metalefty/xrdp that referenced this pull request Dec 9, 2022
On newer builds of openSUSE tumbleweed the path of pam.d has moved from
/usr/etc/pam.d to /usr/lib/pam.d, which prevents install script to
correctly guess pam rules. Updating path in mkpamrules solves the
problem.

(cherry picked from commit 4ff968b)
derekschrock pushed a commit to derekschrock/xrdp that referenced this pull request Dec 15, 2022
On newer builds of openSUSE tumbleweed the path of pam.d has moved from
/usr/etc/pam.d to /usr/lib/pam.d, which prevents install script to
correctly guess pam rules. Updating path in mkpamrules solves the
problem.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants