Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Credentials should work on OSX when user's group is unnamed #42

Open
berekuk opened this issue Nov 1, 2012 · 0 comments
Open

Credentials should work on OSX when user's group is unnamed #42

berekuk opened this issue Nov 1, 2012 · 0 comments
Labels

Comments

@berekuk
Copy link
Owner

berekuk commented Nov 1, 2012

Here's what id command shows on my LDAP-enabled Macbook:

uid=123123123(mmcleric) gid=444444444 groups=444444444,402(com.apple.sharepoint.group.1),12(everyone),33(_appstore),62(netaccounts),80(admin),98(_lpadmin),100(_lpoperator),204(_developer),401(com.apple.access_screensharing)

And here's how tests are failing:

mmcleric@macbook:~/coding/Ubic[master]$ prove -Ilib -v t/cmd.t 
t/cmd.t .. 
1..8
Use of uninitialized value $group in string ne at lib/Ubic/Credentials/OS/MacOSX.pm line 171.
Use of uninitialized value $current_group in string ne at lib/Ubic/Credentials/OS/MacOSX.pm line 171.
Use of uninitialized value $group in string ne at lib/Ubic/Credentials/OS/MacOSX.pm line 171.
Use of uninitialized value $current_group in string ne at lib/Ubic/Credentials/OS/MacOSX.pm line 171.
Use of uninitialized value $group in string ne at lib/Ubic/Credentials/OS/MacOSX.pm line 171.
Use of uninitialized value $current_group in string ne at lib/Ubic/Credentials/OS/MacOSX.pm line 171.
Use of uninitialized value $group in getgrnam at lib/Ubic/Credentials/OS/MacOSX.pm line 119.
Use of uninitialized value $group in getgrnam at lib/Ubic/Credentials/OS/MacOSX.pm line 119.
not ok 1 - Ubic::Cmd logged something on start

#   Failed test 'Ubic::Cmd logged something on start'
#   at t/cmd.t line 25.
#                   'Starting sleeping-daemon... Failed to set effective gid to 0: Operation not permitted at lib/Ubic/Credentials/OS/MacOSX.pm line 247.
# '
#     doesn't match '(?^:^Starting\ sleeping\-daemon\.\.\.\ started\ \(pid\ \d+\)\n$)'
Use of uninitialized value $group in string ne at lib/Ubic/Credentials/OS/MacOSX.pm line 171.
Use of uninitialized value $current_group in string ne at lib/Ubic/Credentials/OS/MacOSX.pm line 171.
Use of uninitialized value $group in getgrnam at lib/Ubic/Credentials/OS/MacOSX.pm line 119.
Use of uninitialized value $group in getgrnam at lib/Ubic/Credentials/OS/MacOSX.pm line 119.
Failed to set effective gid to 0: Operation not permitted at lib/Ubic/Credentials/OS/MacOSX.pm line 247.
# Looks like you planned 8 tests but ran 1.
# Looks like you failed 1 test of 1 run.
# Looks like your test exited with 255 just after 1.
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 8/8 subtests 

Test Summary Report
-------------------
t/cmd.t (Wstat: 65280 Tests: 1 Failed: 1)
  Failed test:  1
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 8 tests but ran 1.
Files=1, Tests=1,  0 wallclock secs ( 0.02 usr  0.01 sys +  0.09 cusr  0.02 csys =  0.14 CPU)
Result: FAIL

So, Credentials should handle nameless groups somehow.
Maybe it's also time to refactor all credentials code into the separate distribution (Credentials::Any?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant