David Niklas writes:

Hello,
I've successfully run the tests of courier 0.75.0 up to the part where
the msg writes info into the ID and ENV files.
Strangely, id output no info into the ID file though sh wrote
"/root/.profile" Permission denied. The env command output many variables
all from /etc/profile, thought the docs say that courier should have a
sanatized environment. All the files in /etc are default for courier with
the exception that I removed the database modules from courier's
authdaemond so that they would not load.
I imagine that courierd is sourcing /etc/profile as root and then trying
to read the user's (root's) .profile file.
The docs do not specify a method of solving this, what do I do?

The short, blunt answer is "figure it out". Something is definitely borked in your environment. You need to figure out why supposedly a new shell started under your userid wants to read /root/.profile. That's obviously wrong.

courierd does not source anything. It is a binary executable. "courier start" runs the courierctl.start script that reads the courierd configuration file with the -a flag, which imports its contents as environment variables, then starts courierd.

One of the sections in the courierd config file, named "SYSLOCALE" sources what the configure script detected as the system configuration file that sets the default system locale. It's a config file that's picked from a fixed list of known system config files. At this time, it's the first file from the following list which exists:

/etc/environment
/etc/default/locale
/etc/sysconfig/i18n /etc/sysconfig/language
/etc/locale.conf

If none of these are found, that section in the courierd file is blank. If found, the contents are read.

I think that courier is not getting started correctly, if you see stuff in your /etc/profile. That shouldn't happen. courierctl.start should be executing 'env -i', to wipe out all traces of your login shell's environment.


Attachment: pgpZTserjDjn3.pgp
Description: PGP signature

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to