Bug 821256

Summary: numlockx - /etc/gdm/Init/Default - after login
Product: [Fedora] Fedora Reporter: Flóki Pálsson <flokip>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: abamobil, adel.gadllah, alphsteiner, didierg-divers, dominick.grift, dwalsh, kkshethin, lukas.mencl, mgrepl, potin10, ramzi986, robweir
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-14 07:16:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Flóki Pálsson 2012-05-13 15:37:58 UTC
Description of problem:
Numlock not set on until after login.


Version-Release number of selected component (if applicable):
numlockx-1.2-2.fc17.x86_64

How reproducible:
always

Steps to Reproduce:
1. install Fedora-17-TC5-x86_64-DVD.iso,  
2. log in innstall numlockx 
3. 
http://www.my-guides.net/en/content/view/125/26/1/3/
yum install numlockx

if [ -x /usr/bin/numlockx ]; then
 /usr/bin/numlockx on
fi
Save and exit. Now restart X server and check if num lock light is on.     
  
Actual results:
numlock is set on after login

Expected results:
numlock on before log in

Additional info:
this is tow or tree weaks old in F17.
This work in F17 - beta an in F10 to F16

See similar bug 
Bug 806947 - numlockx sets the num lock too late, it should run before gdm

Comment 1 Didier G 2012-05-29 23:47:49 UTC
Same problem with numlockx...

I added 

if [ -x /usr/bin/numlockx ]; then
        /usr/bin/numlockx on
fi

in /etc/gdm/Init/Default as usual but it does not work with FC17 final.

Comment 2 aba 2012-06-15 10:34:27 UTC
The same....

Looks /etc/gdm/Init/Default does not start.

Added following

echo GDM Init Default>>/public/xxx
/bin/logger GDM Init Default
/bin/ps axjf>>/public/xxx
/usr/bin/numlockx

Nothing.....

But, if to set SELinux=permisive everything works for me.

Supose the problem is
/etc/gdm/Init/Default does not start when SELinux is ENFORCE.

Comment 3 Xavixelles 2012-06-19 07:55:03 UTC
Same...

I added 

if [ -x /usr/bin/numlockx ]; then
        /usr/bin/numlockx on
fi

in /etc/gdm/Init/Default as usual but it does not work with FC17

Comment 4 Robert Weir 2012-07-15 20:19:03 UTC
Same
  I am having exactly the same result in my F17.

Comment 5 kksheth 2012-07-16 04:55:10 UTC
I have no problem.
I have followed earlier solution of installing of numlockx and editing /etc/gdm/Init/Default by way of adding at end 

if [ -x /usr/bin/numlockx ]; then
        /usr/bin/numlockx on
fi

and it works for me. I may state that i am using autologin and i have installed three interface( Gnome, Kde & Cinnamon). I wanted numlock on always and this served my purpose.

One problem i noticed is when i logout for some reason and re-login, numlock was off. Not a big deal.

Comment 6 kksheth 2012-07-16 04:57:08 UTC
above applies to fedora17 32 bit (In my office comp) and fedfora17 64 bit (My home comp)

Comment 7 Robert Weir 2012-07-17 04:47:29 UTC
Hi
  I have CONFIRMED that this is a 'selinux' issue.  If I put selinux to permissive the code referred to herein works.  If I leave it to 'enforcing' it fails to put the numlock on at the login prompt.
  Could this bug be moved to 'selinux'?  Thank you
Robert

Comment 8 Adel Gadllah 2012-07-17 19:22:32 UTC
(In reply to comment #7)
> Hi
>   I have CONFIRMED that this is a 'selinux' issue.  If I put selinux to
> permissive the code referred to herein works.  If I leave it to 'enforcing'
> it fails to put the numlock on at the login prompt.
>   Could this bug be moved to 'selinux'?  Thank you
> Robert

Yes.

Comment 9 Daniel Walsh 2012-07-23 15:59:06 UTC
What avc messages are you seeing?

Comment 10 Robert Weir 2012-07-23 18:25:46 UTC
(In reply to comment #9)
> What avc messages are you seeing?

Sorry to whom are you directing this question?

Comment 11 Alphonse Steiner 2012-07-24 08:44:15 UTC
Hello, I have looked at the problem: here the responsible AVC (I presume):

type=AVC msg=audit(1343118306.360:84): avc:  denied  { search } for  pid=746 comm="gdm-simple-slav" name="Init" dev="sda1" ino=30991 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:xdm_unconfined_exec_t:s0 tclass=dir

For the inode:
# ll -i /etc/gdm/Init/ -d
30991 drwxr-xr-x. 2 root root 4096  2 juil. 17:04 /etc/gdm/Init/
# ll -Z /etc/gdm/Init/ -d
drwxr-xr-x. root root system_u:object_r:xdm_unconfined_exec_t:s0 /etc/gdm/Init/

So, it looks like gdm cannot read its initialisation directory.

Comment 12 Flóki Pálsson 2012-09-12 21:35:36 UTC
Works in F18 RC2 live.

Comment 13 Miroslav Grepl 2012-09-14 07:16:07 UTC
(In reply to comment #12)
> Works in F18 RC2 live.

Yes, We added fixes. Thanks for testing.

Comment 14 ramzi 2013-06-19 23:28:05 UTC
i have the same problem, numlock doesn't start in GDM