This file is indexed.

/usr/share/augeas/lenses/dist/tests/test_fstab.aug is in augeas-lenses 1.4.0-0ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
module Test_fstab =

  let simple = "/dev/vg00/lv00\t /\t ext3\t    defaults        1 1\n"

  let simple_tree =
    { "1"
        { "spec" = "/dev/vg00/lv00" }
        { "file" = "/" }
        { "vfstype" = "ext3" }
        { "opt" = "defaults" }
        { "dump" = "1" }
        { "passno" = "1" } }

  let trailing_ws = "/dev/vg00/lv00\t /\t ext3\t    defaults        1 1  \t\n"

  let gen_no_passno(passno:string) =
    "LABEL=/boot\t /boot\t ext3\t    defaults        1" . passno . "  \t\n"
  let no_passno = gen_no_passno ""

  let no_passno_tree =
    { "1"
        { "spec" = "LABEL=/boot" }
        { "file" = "/boot" }
        { "vfstype" = "ext3" }
        { "opt" = "defaults" }
        { "dump" = "1" } }

  let no_dump = "/dev/vg00/lv00\t /\t ext3\t    defaults\n"

  let no_dump_tree =
    { "1"
        { "spec" = "/dev/vg00/lv00" }
        { "file" = "/" }
        { "vfstype" = "ext3" }
        { "opt" = "defaults" } }

  let no_opts = "/dev/vg00/lv00\t /\t ext3\n"

  let no_opts_tree =
    { "1"
        { "spec" = "/dev/vg00/lv00" }
        { "file" = "/" }
        { "vfstype" = "ext3" } }

  let multi_opts = "devpts\t /dev/pts\t devpts  gid=5,mode=620,fscontext=system_u:object_r:removable_t  0 0\n"

  let multi_opts_tree =
    { "1"
        { "spec" = "devpts" }
        { "file" = "/dev/pts" }
        { "vfstype" = "devpts" }
        { "opt" = "gid"
            { "value" = "5" } }
        { "opt" = "mode"
            { "value" = "620" } }
        { "opt" = "fscontext"
            { "value" = "system_u:object_r:removable_t" } }
        { "dump" = "0" }
        { "passno" = "0" } }

  test Fstab.lns get simple = simple_tree

  test Fstab.lns get trailing_ws = simple_tree

  test Fstab.lns get no_passno = no_passno_tree

  test Fstab.lns put no_passno after set "/1/passno" "1" = gen_no_passno " 1"

  test Fstab.lns get no_dump = no_dump_tree

  test Fstab.lns get no_opts = no_opts_tree

  test Fstab.lns get multi_opts = multi_opts_tree

  test Fstab.lns get "/dev/hdc        /media/cdrom0   udf,iso9660 user,noauto\t0\t0\n" =
    { "1"
        { "spec" = "/dev/hdc" }
        { "file" = "/media/cdrom0" }
        { "vfstype" = "udf" }
        { "vfstype" = "iso9660" }
        { "opt" = "user" }
        { "opt" = "noauto" }
        { "dump" = "0" }
        { "passno" = "0" } }

  (* Allow # in the spec *)
  test Fstab.lns get "sshfs#jon@10.0.0.2:/home    /media/server    fuse    uid=1000,gid=100,port=1022 0 0\n" =
  { "1"
    { "spec" = "sshfs#jon@10.0.0.2:/home" }
    { "file" = "/media/server" }
    { "vfstype" = "fuse" }
    { "opt" = "uid"
         { "value" = "1000" } }
    { "opt" = "gid"
         { "value" = "100" } }
    { "opt" = "port"
         { "value" = "1022" } }
    { "dump" = "0" }
    { "passno" = "0" } }

  (* Bug #191 *)
  test Fstab.lns get "tmpfs /dev/shm tmpfs rw,rootcontext=\"system_u:object_r:tmpfs_t:s0\" 0 0\n" =
  { "1"
    { "spec" = "tmpfs" }
    { "file" = "/dev/shm" }
    { "vfstype" = "tmpfs" }
    { "opt" = "rw" }
    { "opt" = "rootcontext"
      { "value" = "\"system_u:object_r:tmpfs_t:s0\"" } }
    { "dump" = "0" }
    { "passno" = "0" } }

  (* BZ https://bugzilla.redhat.com/show_bug.cgi?id=751342
   * Mounting multiple cgroups together results in path with ','
   *)
  test Fstab.lns get "spec /path/file1,file2 vfs opts 0 0\n" =
  { "1"
    { "spec" = "spec" }
    { "file" = "/path/file1,file2" }
    { "vfstype" = "vfs" }
    { "opt" = "opts" }
    { "dump" = "0" }
    { "passno" = "0" } }

  (* Parse when empty option value given, only equals sign *)
  test Fstab.lns get "//host.example.org/a_share /mnt cifs defaults,ro,password= 0 0\n" =
  { "1"
    { "spec" = "//host.example.org/a_share" }
    { "file" = "/mnt" }
    { "vfstype" = "cifs" }
    { "opt" = "defaults" }
    { "opt" = "ro" }
    { "opt" = "password"
      { "value" }
    }
    { "dump" = "0" }
    { "passno" = "0" }
  }

  (* Allow end of line comments *)
  test Fstab.lns get "UUID=0314be77-bb1e-47d4-b2a2-e69ae5bc954f	/	ext4	rw,errors=remount-ro	0	1	# device at install: /dev/sda3\n" =
  { "1"
    { "spec" = "UUID=0314be77-bb1e-47d4-b2a2-e69ae5bc954f" }
    { "file" = "/" }
    { "vfstype" = "ext4" }
    { "opt" = "rw" }
    { "opt" = "errors"
      { "value" = "remount-ro" }
    }
    { "dump" = "0" }
    { "passno" = "1" }
    { "#comment" = "device at install: /dev/sda3" }
  }

(* Local Variables: *)
(* mode: caml       *)
(* End:             *)