Created attachment 920563 [details]
Potential patch for /etc/profile.d/perl-homedir.csh
Description of problem:
If the file /etc/sysconfig/perl-homedir contains the line PERL_HOMEDIR=0, users with CSH as login shell will an error during login: "PERL_HOMEDIR=0: Command not found." and the directory gets created anyways.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Put the line PERL_HOMEDIR=0 into /etc/sysconfig/perl-homedir
2. useradd -s /bin/csh test
3. su - test
PERL_HOMEDIR=0: Command not found.
Attempting to create directory /home/emroot/perl5
No error message and the directory ~/perl5 will not get created.
The file /etc/sysconfig/perl-homedir is in BASH syntax and works perfectly for users with BASH as login shell. The CSH script /etc/profile.d/perl-homedir.csh simply sources the file and thus runs into an error due to syntax mismatch. An eval line is needed instead of a simple source (patch for working solution attached).
Indeed. The configuration files have to be parsed to be useful for csh profile script. Thank you for the report and the patch.
Created attachment 920863 [details]
How to test:
(1) Install perl-homedir and tcsh packages.
(2) Create /etc/sysconfig/perl-homedir with "PERL_HOMEDIR=0" content and run a tcsh as log-in shell:
"PERL_HOMEDIR=0: Command not found." error message is printed and the
PERL_HOMEDIR variable is set to 1 in the shell.
No error message is printed and the PERL_HOMEDIR variable is set to 0.
(3) Remove the /etc/sysconfig/perl-homedir, create ~/.perl-homedir with "PERL_HOMEDIR=0" content and run a tcsh as log-in shell. The results should be the same as in (2).
Thomas, could you please report this issue to the Red Hat support. Doing so increases chance that this fix will be approved as it will be recognized as a customer-facing problem.
Created attachment 921723 [details]
This sed(1) resides in /bin/sed, not in /usr/bin/sed. The wrong path would break dependency solver.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.