Opened 12 years ago

Closed 12 years ago

#4118 closed enhancement (fixed)

Fix hostname call to be SELinux friendly

Reported by: anonymous Owned by: Rob Smith
Priority: minor Milestone: unknown
Component: mythweb Version: unknown
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Not sure if this was already posted. I have mythweb working with my SELinux-enabled system with this simple change. I find it rather dismissive to disable SELinux on my apache daemon for one bug fix. Would probably have to test on Windows ( I have no capability)

[root@chronos includes]# pwd /var/www/html/mythtv/includes [root@chronos includes]# diff init.php init.php.orig 42,43c42 < $uname=posix_uname(); < define('hostname', empty($_SERVERhostname?) ? trim($unamenodename?) : $_SERVERhostname?); ---

define('hostname', empty($_SERVERhostname?) ? trim(hostname) : $_SERVERhostname?);

Change History (5)

comment:1 Changed 12 years ago by anonymous

oops. should read:

[root@chronos includes]# pwd
/var/www/html/mythtv/includes
[root@chronos includes]# diff init.php init.php.orig
42,43c42
<     $uname=posix_uname();
<     define('hostname', empty($_SERVER['hostname']) ? trim($uname['nodename']) : $_SERVER['hostname']);
---
>     define('hostname', empty($_SERVER['hostname']) ? trim(`hostname`) : $_SERVER['hostname']);

comment:2 Changed 12 years ago by Rob Smith

Owner: changed from xris to Rob Smith
Status: newassigned

comment:3 Changed 12 years ago by Rob Smith

Resolution: fixed
Status: assignedclosed

(In [14846]) Fixes #4118, adds in support for a new subtitle type. Thanks Nick

comment:4 Changed 12 years ago by Rob Smith

Resolution: fixed
Status: closedreopened

whoops, wrong number

comment:5 Changed 12 years ago by Rob Smith

Resolution: fixed
Status: reopenedclosed

(In [14847]) Fixes #4118, this uses the posix function to determin hostname, making this selinux safe.

Note: See TracTickets for help on using tickets.