Parental Control Issue (Block Program is always grayed)

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

Parental Control Issue (Block Program is always grayed)

Postby anant7 » Mar 12th, '13, 21:04

Hi Guys,

I'm new to Mageia, I have been a long time user of Ubuntu and OpenSuse. The first thing I would like to tell that I'm highly impressed with the quality of this product and I found the control center as useful as OpenSuse's YAST. Well here is my issue - I enabled the Parental Control, web content filtering is working fine after starting dansguardian service. But when I click on the "Parental Control" in Control Center I get following message even though I restarted the system multiple times. Block programs tab is always grayed.

Code: Select all
The support for Access Control List, required by the Block Programs feature, is enabled, but not yet activated. It is necessary to restart your computer to activate it


I would really appreciate if someone can help to fix this issue.

Regards,
Anant
anant7
 
Posts: 5
Joined: Mar 12th, '13, 20:51

Re: Parental Control Issue (Block Program is always grayed)

Postby marja » Mar 14th, '13, 07:48

Strange, when I searched bugzilla after reading your post, I didn't find bug 9195 about this issue https://bugs.mageia.org/show_bug.cgi?id=9195

I was reluctant to tell you to file a bug, because there is currently no maintainer for drakguard or dansguardian, but it is good you filed one anyway: bugs that have duplicates get a bit more attention than other ones ;)

Also, the more different people say in a bug report that they suffer from the bug too and are willing to help test a potential fix, the more likely it is that someone will put other things aside to try to find one.
User avatar
marja
 
Posts: 541
Joined: Aug 22nd, '11, 20:50

Re: Parental Control Issue (Block Program is always grayed)

Postby anant7 » Mar 14th, '13, 14:42

Well looks like no distro is having this functionality except Mandriva/Megia and according to me its a MUST HAVE feature if you want your kid to give a laptop with one of the distro. Look at windows and OSX they both have a very sophisticated Parental Control and that works very well but unfortunately even Ubuntu doesn't provide any feature like this. So far I saw two projects that were very interesting and close to perfection, Gnome-Nanny and Drakguard, both failing at one point and unfortunately both are suffering from halted development.
anant7
 
Posts: 5
Joined: Mar 12th, '13, 20:51

Re: Parental Control Issue (Block Program is always grayed)

Postby djennings » Mar 14th, '13, 22:27

If you respond 'No' when you see that pop up, then you can continue to set up Drakguard but you will lose the ability to block your childrens access to specific programmes.

I just tried it out and it works OK with blocking internet sites and time windows.

Drakguard is just a front end for DandGuardian so there is nothing stopping you from following the DansGuardian configuration guide and modifying the configuration drakguard has made if you need to block specific programmes..

When I have time I will take a look at the code and see if I can figure out where the problem is. I will PM you when (if) I have a fix.
User avatar
djennings
 
Posts: 613
Joined: Jun 2nd, '11, 23:51
Location: Wokingham, UK

Re: Parental Control Issue (Block Program is always grayed)

Postby anant7 » Mar 14th, '13, 22:34

Well as I mentioned earlier, I have no problem setting up the content filtering and it works fine. But blocking the program is cool, its pretty much the same as Windows 7 parental control or Mac's Parental Control. I can live without it but if the nice-to-have functionality is there and if its buggy then lets fix it instead of let it go.
anant7
 
Posts: 5
Joined: Mar 12th, '13, 20:51

Re: Parental Control Issue (Block Program is always grayed)

Postby djennings » Mar 14th, '13, 22:56

Well I have found one bug which looks like it may be the one you are experiencing.

If your /etc/fstab file contains a comment line which includes the text
Code: Select all
ext
anywhere in it, then drakguard will give the symptom you describe with the pop up offering to enable acl that will not go away.

Simple workaround is to remove the string 'ext' from any comment in fstab
User avatar
djennings
 
Posts: 613
Joined: Jun 2nd, '11, 23:51
Location: Wokingham, UK

Re: Parental Control Issue (Block Program is always grayed)

Postby anant7 » Mar 14th, '13, 23:09

Here is the /etc/fstab entries on my system

Code: Select all
# Entry for /dev/sda1 :
UUID=bdc277cf-33b6-4aad-88e0-c6eb0b9881f5 / ext4 defaults,acl 1 1
# Entry for /dev/sda6 :
UUID=6f995a59-8018-4fe4-956b-6041c8f570d6 /home ext4 defaults,acl 1 2
none /proc proc defaults 0 0
# Entry for /dev/sda5 :
UUID=10521099-3ee9-4120-abab-685c82e04c4c swap swap defaults 0 0


I dont see any "ext" in comment
anant7
 
Posts: 5
Joined: Mar 12th, '13, 20:51

Re: Parental Control Issue (Block Program is always grayed)

Postby djennings » Mar 14th, '13, 23:34

I dont see any "ext" in comment

In that case I have found a different bug. I did have a comment line in my fstab with 'ext' in it, and after editing the line drakguard started without complaint.

Just for reference the fix for that bug was to edit /usr/sbin/drakguard around line 299
from
Code: Select all
if ( (grep {$_ && !/acl/} chomp_(cat_($fstab_file)) && grep {$_ && m/ext/} chomp_(cat_($fstab_file)))) {

to
Code: Select all
if ( (grep {$_ && !/^#|acl/} chomp_(cat_($fstab_file)) && grep {$_ && m/ext/} chomp_(cat_($fstab_file)))) {


It is getting late now so I will stop looking for now and have another go tomorrow.
User avatar
djennings
 
Posts: 613
Joined: Jun 2nd, '11, 23:51
Location: Wokingham, UK

Re: Parental Control Issue (Block Program is always grayed)

Postby djennings » Mar 15th, '13, 01:51

OK I think I understand what is happening now.

drakguard checks that acl is enabled by using the 'mount' command, and if it sees acl on any partition it assumes acl is enabled on all partitions.

However in Mageia acl is enabled by default on ext4 by the kernel option CONFIG_EXT4_FS_POSIX_ACL and the the acl option does not show up on ext4 partitions even though it works so drakguard thinks acl is not working when in fact it is.

On my own computer one of my partitions is ext3, so the mount command shows acl is present on the ext3 partition and drakguard is satisfied.

As a temporary workaround edit /usr/sbin/drakguard around line 299 to disable the test for acl
Code: Select all
if ( (grep {$_ && !/^#|acl/} chomp_(cat_($fstab_file)) && grep {$_ && m/ext/} chomp_(cat_($fstab_file)))) {
    $acl_active = 1;
   $in->ask_yesorno(N("Warning"), N("The support for Access Control Lists must be enabled in order to use the Block programs feature.\nDo you want to enable it now?", $acl_active = 1)) or $acl_active = 0;
    if ($acl_active) {
   my @ext_lines = grep {$_ && m/ext/} chomp_(cat_($fstab_file));
       foreach my $line (@ext_lines){
            my ($id, $directory, $flag, $number) = $line=~ /^(.+)\s(.+)\s(ext(\w)\s(\w*))\s(.*)/ or next;
            $line =~ s/ext(\w)\s(\w*)\s/$flag,acl /g;
            subst_config_line($fstab_file,"$line\n"); #adds ,acl in the fstab file in the first run
            # remount filesystem with acl parameter
       }
   $acl_active = 0;
    $in->ask_warn(N("Warning"), N("The support for Access Control Lists was enabled.") . N("It is necessary to restart your computer to activate it."));
    }
}
else {
#    my @mount = `mount`;
#    if (grep (/,acl/, @mount)) {
        $acl_active = 1;
#    } else {
#        $in->ask_warn(N("Warning"), N("The support for Access Control Lists, required by the Block programs feature, is enabled, but not yet activated.") . N("It is #necessary to restart your computer to activate it."), $acl_active = 0);}
}
User avatar
djennings
 
Posts: 613
Joined: Jun 2nd, '11, 23:51
Location: Wokingham, UK

Re: Parental Control Issue (Block Program is always grayed)

Postby anant7 » Mar 15th, '13, 02:18

Awesome.... it did the trick.

thanks alot man, you are genius :)
anant7
 
Posts: 5
Joined: Mar 12th, '13, 20:51

Re: Parental Control Issue (Block Program is always grayed)

Postby Ken-Bergen » Mar 15th, '13, 02:55

Perhaps a bug report would be in order?
Ken
Ken-Bergen
 
Posts: 1019
Joined: Mar 30th, '11, 02:45
Location: Chilliwack, BC, Canada

Re: Parental Control Issue (Block Program is always grayed)

Postby marja » Mar 15th, '13, 08:30

Ken-Bergen wrote:Perhaps a bug report would be in order?


A related bug report has been updated:
https://bugs.mageia.org/show_bug.cgi?id=9195#c5
User avatar
marja
 
Posts: 541
Joined: Aug 22nd, '11, 20:50

Re: Parental Control Issue (Block Program is always grayed)

Postby djennings » Mar 15th, '13, 15:33

A full patch is now available attached to the bug report.
https://bugs.mageia.org/show_bug.cgi?id=9195

Just in case you are not familiar with applying patches, download the patch and then
Code: Select all
su
cd to_download_location
urpme drakguard
urpmi drakguard
patch -p3 /usr/sbin/drakguard drakguard.patch


(The urpme/urpmi is to uninstall and reinstall drakguard to get rid of yesterdays temporary patch)
Please mention if it works or not on the bug report.
User avatar
djennings
 
Posts: 613
Joined: Jun 2nd, '11, 23:51
Location: Wokingham, UK


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron