LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-27-2017, 05:01 PM   #1
chris.willing
Member
 
Registered: Jun 2014
Location: Brisbane, Australia
Distribution: Slackware,LFS
Posts: 914

Rep: Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619
libcgroup - supplied rc.cgred broken by erroneous patch


The patch libcgroup.init.diff.gz which is applied when libcgroup package is built is broken. It changes loading of /etc/sysconfig/cgred.conf to loading of $CGRED_CONF which is set to /etc/cgrules.conf. It should instead be loading /etc/cgred.conf which defines various OPTIONS. I guess the confusion is due to there being two configuration files used when rc.cgred is run. The affected part of the patch (right near the top) should really be:
Code:
 # Read in configuration options.
-if [ -f "/etc/sysconfig/cgred.conf" ] ; then
-       . /etc/sysconfig/cgred.conf
+if [ -f /etc/cgred.conf ] ; then
+       . /etc/cgred.conf
This leads to another configuration issue. When /etc/cgred.conf is now sourced, it defines SOCKET_GROUP="cgred" where cgred is a system group but that group doesn't exist. It could be defined SOCKET_GROUP="" (effectively root group) but it's probably best to have a new system group named cgred. This enables cgexec to be run sgid instead of suid (requires explicit 'chmod 2755 /usr/bin/cgexec' though).

One other related concern is that when "/etc/rc.d/rc.cgconfig stop" is run, it calls /usr/sbin/cgclear. Could this call be made "/usr/sbin/cgclear -l /etc/cgconfig.conf" instead please? Otherwise the whole cgroup file system is removed which is not what is wanted if running "rc.cgconfig restart" because "rc.cgconfig start" assumes that the root of the cgroup filesystem already exists. The cgroup filesystem root is normally created early in rc.S but the plain cgclear removes it (along with anything subsequently added to it) and there's no existing mechanism at the moment to reinstate the root so that "rc.cgconfig start" can add to it.

Thanks,
chris
 
Old 03-01-2017, 03:03 AM   #2
chris.willing
Member
 
Registered: Jun 2014
Location: Brisbane, Australia
Distribution: Slackware,LFS
Posts: 914

Original Poster
Rep: Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619
Thanks, I see the fixes in -current's ChangeLog.txt Feb 28.

Any chance of applying them to 14.2 as well? Unless -current is becoming stable next week, of course

chris
 
Old 03-01-2017, 01:37 PM   #3
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,464

Rep: Reputation: 8373Reputation: 8373Reputation: 8373Reputation: 8373Reputation: 8373Reputation: 8373Reputation: 8373Reputation: 8373Reputation: 8373Reputation: 8373Reputation: 8373
Quote:
Originally Posted by chris.willing View Post
Any chance of applying them to 14.2 as well?
Done.

Quote:
Unless -current is becoming stable next week, of course
Nope, probably not. :-)
 
3 members found this post helpful.
Old 03-01-2017, 03:50 PM   #4
chris.willing
Member
 
Registered: Jun 2014
Location: Brisbane, Australia
Distribution: Slackware,LFS
Posts: 914

Original Poster
Rep: Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619
Quote:
Originally Posted by volkerdi View Post
Done.
Thanks, I see the new libcgroup package for 14.2 but not the etc package (for additional cgred group).

chris
 
Old 03-01-2017, 03:58 PM   #5
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,464

Rep: Reputation: 8373Reputation: 8373Reputation: 8373Reputation: 8373Reputation: 8373Reputation: 8373Reputation: 8373Reputation: 8373Reputation: 8373Reputation: 8373Reputation: 8373
Quote:
Originally Posted by chris.willing View Post
Thanks, I see the new libcgroup package for 14.2 but not the etc package (for additional cgred group).
The 14.2 packages do not add a new group, but do have the other fixes.
 
Old 03-01-2017, 04:28 PM   #6
chris.willing
Member
 
Registered: Jun 2014
Location: Brisbane, Australia
Distribution: Slackware,LFS
Posts: 914

Original Poster
Rep: Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619
OK Tx.

chris
 
Old 06-01-2018, 12:22 AM   #7
chris.willing
Member
 
Registered: Jun 2014
Location: Brisbane, Australia
Distribution: Slackware,LFS
Posts: 914

Original Poster
Rep: Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619
Working through some container issues, I discovered that the fix to rc.cgred for 14.2 went bad somewhere along the line. Instead of sourcing /etc/cgred.conf, it sources $CGRED_CONF which is set to /etc/cgrules.conf.

I see that it has been corrected in -current; could it be corrected in 14.2 as well please?

chris
 
Old 06-01-2018, 12:28 PM   #8
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,464

Rep: Reputation: 8373Reputation: 8373Reputation: 8373Reputation: 8373Reputation: 8373Reputation: 8373Reputation: 8373Reputation: 8373Reputation: 8373Reputation: 8373Reputation: 8373
Quote:
Originally Posted by chris.willing View Post
Working through some container issues, I discovered that the fix to rc.cgred for 14.2 went bad somewhere along the line. Instead of sourcing /etc/cgred.conf, it sources $CGRED_CONF which is set to /etc/cgrules.conf.

I see that it has been corrected in -current; could it be corrected in 14.2 as well please?
I'm not seeing that here. The init script in 14.2's /patches is identical to the one in -current.
 
Old 06-01-2018, 06:44 PM   #9
chris.willing
Member
 
Registered: Jun 2014
Location: Brisbane, Australia
Distribution: Slackware,LFS
Posts: 914

Original Poster
Rep: Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619
Quote:
Originally Posted by volkerdi View Post
I'm not seeing that here. The init script in 14.2's /patches is identical to the one in -current.
Yes, my mistake. I was working on a fix for 100% cpu usage by cgrulesengd but used the original /source/a/libcgroup directory rather than /patches/source/libgroup.

I'll check the fix against the correct version before posting it.

chris
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Patch for broken Lightning calendar color selector dialog ljb643 Slackware 6 01-02-2017 05:35 PM
LXer: Microsoft takes five months to replace broken patch LXer Syndicated Linux News 0 08-03-2016 02:11 AM
libcgroup and /etc/rc.d scripts rmjohnso Slackware 1 02-27-2011 04:39 PM
Added libcgroup mlpa Slackware 1 01-10-2011 08:16 PM
broken X headers in security patch from 2007-03-07? cab15625 Slackware 6 04-12-2007 09:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration