~ubuntu-branches/ubuntu/saucy/augeas/saucy-proposed

« back to all changes in this revision

Viewing changes to lenses/tests/test_sudoers.aug

  • Committer: Package Import Robot
  • Author(s): Nicolas Valcárcel Scerpella
  • Date: 2011-11-10 09:20:03 UTC
  • mto: (1.5.1) (19.1.11 precise)
  • mto: This revision was merged to the branch mainline in revision 22.
  • Revision ID: package-import@ubuntu.com-20111110092003-sb3z6bq97rlb96de
Tags: upstream-0.9.0
Import upstream version 0.9.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
# User privilege specification
29
29
root    ALL=(ALL) ALL
 
30
root    ALL=(: ALL) ALL
 
31
root    ALL=(ALL :ALL) ALL
30
32
 
31
33
# Members of the admin group may gain root privileges
32
34
%admin  ALL=(ALL) ALL, NOPASSWD  :      NOSETENV: \
101
103
              { "host" = "ALL" }
102
104
              { "command" = "ALL"
103
105
                  { "runas_user"  = "ALL" } } } }
 
106
      { "spec"
 
107
          { "user" = "root" }
 
108
          { "host_group"
 
109
              { "host" = "ALL" }
 
110
              { "command" = "ALL"
 
111
            { "runas_group" = "ALL" } } } }
 
112
      { "spec"
 
113
          { "user" = "root" }
 
114
          { "host_group"
 
115
              { "host" = "ALL" }
 
116
              { "command" = "ALL"
 
117
                  { "runas_user"  = "ALL" }
 
118
            { "runas_group" = "ALL" } } } }
104
119
      {}
105
120
      { "#comment" = "Members of the admin group may gain root privileges" }
106
121
      { "spec"
169
184
test Sudoers.lns get s =
170
185
  { "Defaults"
171
186
    { "secure_path" = "/sbin:/bin:/usr/sbin:/usr/bin" } }
 
187
 
 
188
(* Ticket #206, comments at end of lines *)
 
189
let commenteol = "#
 
190
Defaults targetpw    # ask for
 
191
Host_Alias LOCALNET = 192.168.0.0/24   # foo eol
 
192
root    ALL=(ALL) ALL                  # all root\n"
 
193
test Sudoers.lns get commenteol =
 
194
  {}
 
195
  { "Defaults"
 
196
    { "targetpw" }
 
197
    { "#comment" = "ask for" } }
 
198
  { "Host_Alias"
 
199
      { "alias"
 
200
    { "name" = "LOCALNET" }
 
201
          { "host" = "192.168.0.0/24" } }
 
202
    { "#comment" = "foo eol" } }
 
203
  { "spec"
 
204
      { "user" = "root" }
 
205
      { "host_group"
 
206
    { "host" = "ALL" }
 
207
    { "command" = "ALL"
 
208
        { "runas_user"  = "ALL" } } }
 
209
    { "#comment" = "all root" } }