Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Developers' Forum

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 20th August 2010, 15:07
jwarnier jwarnier is offline
Member
 
Join Date: Jan 2008
Location: Brussels, Belgium
Posts: 34
Thanks: 5
Thanked 0 Times in 0 Posts
Default system.inc.php is deprecated

I noticed server/lib/classes/system.inc.php is deprecated (not "required" from anywhere).
While the features in it would benefit the overall code size.
Would you mind if we reworked this file and used the features from the other scripts?
Reply With Quote
Sponsored Links
  #2  
Old 23rd August 2010, 12:16
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,022
Thanks: 840
Thanked 5,653 Times in 4,462 Posts
Default

Some of the functions from system.inc.php are in use be plugins, so it is not deprecated. If I remember correctly, the apache plugin or one of the shell user plugins use functions from this file.

I'am aware that a lot of functions in that file are not in use and I will remove them when I have a bit free time.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 23rd August 2010, 12:30
jmontoya jmontoya is offline
Member
 
Join Date: May 2010
Location: France
Posts: 52
Thanks: 2
Thanked 4 Times in 4 Posts
Default

This is a list of functions I found that uses the $app->system calls that I didn't find before.

The including file method is: $app->uses("system");
I was looking for some "require_once" before.

apache plugin and others:
  • is_group
  • is_user
  • add_user_to_group

mail plugin
  • maildirmake

shell user plugin
  • getuid


I didn't find calls of chmod, chown, etc...
__________________
Julio Montoya
BeezNest : http://www.beeznest.com
Blog: http://phpcommit.wordpress.com
Reply With Quote
  #4  
Old 23rd August 2010, 12:32
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,022
Thanks: 840
Thanked 5,653 Times in 4,462 Posts
Default

Yes, thats correct. As I mentioned above, just a few functions from this library are currently in use. So the file is not deprecated, it just needs a bit cleaning.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 23rd August 2010, 13:05
jwarnier jwarnier is offline
Member
 
Join Date: Jan 2008
Location: Brussels, Belgium
Posts: 34
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by till View Post
Yes, thats correct. As I mentioned above, just a few functions from this library are currently in use. So the file is not deprecated, it just needs a bit cleaning.
I my quest to remove as many calls to exec(), system(), etc... I feel the need (as a start) for smart (recursive) chown(), chgrp(), chmod(), which could be there (and replace the not-so-smart current ones).
Reply With Quote
  #6  
Old 23rd August 2010, 13:11
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,022
Thanks: 840
Thanked 5,653 Times in 4,462 Posts
 
Default

Quote:
Originally Posted by jwarnier View Post
I my quest to remove as many calls to exec(), system(), etc... I feel the need (as a start) for smart (recursive) chown(), chgrp(), chmod(), which could be there (and replace the not-so-smart current ones).
Yes, that would be a good improvement. For all other calls were we dont have a generic function I wanted to replace all exec() and system() calls by calls to (new) functions $app->system->exec() and $app->system->system() so we can add some logging code and maybe additional security checks.

One function that might be good for security too is to write our own recursive rm function where we can set the owner of the files that shall be deleted as parameter, so this function deletes only files of a specific owner.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fresh Install of Ubuntu 10.04 and ISPConfig 2 happz Installation/Configuration 10 29th July 2010 16:25
Remoting jhurleston Developers' Forum 5 29th July 2010 14:00
Problem with services!! banzaiwebstudio.com Installation/Configuration 7 19th May 2010 22:13
ISPConfig 2 few problems Tarka Installation/Configuration 8 13th May 2010 14:30
Facebook RSS feed app invite page deprecated godrox HOWTO-Related Questions 16 29th January 2010 08:37


All times are GMT +2. The time now is 18:48.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.