cPanel SafeFile.pm changes

Locked
nickp666
Junior Member
Posts: 36
Joined: 15 Dec 2006, 08:30
Location: UK
Contact:

cPanel SafeFile.pm changes

Post by nickp666 »

seeing loads of log entries for cmm in my cpanel error_log relating to SafeFile.pm:
2008-11-03 10:54:53 warn [addon_cmm] safeunlock: Invalid arguments at /usr/local/cpanel/Cpanel/SafeFile.pm line 138
Cpanel::SafeFile::safeunlock(undef) called at /usr/local/cpanel/Cpanel/SafeFile.pm line 73
Cpanel::SafeFile::safeclose(GLOB(0xd98310), undef) called at /usr/local/cpanel/whostmgr/docroot/cgi/addon_cmm.cgi line 675
JamesFW
Junior Member
Posts: 1
Joined: 03 Nov 2008, 12:22

Post by JamesFW »

I am experiencing the same error message.

I think this SafeFile.pm error is preventing the display of the list of email accounts on some cpanel accounts. (I could be wrong however :))

cPanel 11.24.0-C30365 - WHM 11.24.0 - X 3.9
REDHAT Enterprise 5.2 i686 on standard
chirpy
Moderator
Posts: 3537
Joined: 09 Dec 2006, 18:13

Post by chirpy »

Are you running the latest version of cmm?
nickp666
Junior Member
Posts: 36
Joined: 15 Dec 2006, 08:30
Location: UK
Contact:

Post by nickp666 »

v1.10
Running on 11.24.0-C30365 CentOS 4 x86_64

Running dovecot instead of courier
chirpy
Moderator
Posts: 3537
Joined: 09 Dec 2006, 18:13

Post by chirpy »

Looks like cPanel have changed their module functionality (sigh) I'll have a look into it when I get a chance.
nickp666
Junior Member
Posts: 36
Joined: 15 Dec 2006, 08:30
Location: UK
Contact:

Post by nickp666 »

looks as if its only where variables are used in the creation of the lock.

the offending line is:

Code: Select all

my $inlock = Cpanel::SafeFile::safeopen(\*IN,"<","$homedir/etc/$domain/passwd");
All the others with explictly specified paths seem to work as expected if thats any help
chirpy
Moderator
Posts: 3537
Joined: 09 Dec 2006, 18:13

Post by chirpy »

Thanks Nick. I'll check the code and release a fix for it in a short while.
chirpy
Moderator
Posts: 3537
Joined: 09 Dec 2006, 18:13

Post by chirpy »

The issue is actually orphaned domains in /etc/localdomains (i.e. not owned by a cPanel user). I've put in checks for this and will release the new version in a moment.
chirpy
Moderator
Posts: 3537
Joined: 09 Dec 2006, 18:13

Post by chirpy »

This is now fixed in v1.11 which I've just released.
Locked