This file is indexed.

/usr/sbin/rainbow-resume is in rainbow 0.8.7-2.

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

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
#!/usr/bin/python

import os
import sys

from os.path import join
from optparse import OptionParser

from rainbow.util import make_reporter, enable_verbose_tracebacks, EnvMerge

enable_verbose_tracebacks()

usage = "usage: sudo %prog [options] RESUME_UID /path/to/program"

def main():
    parser = OptionParser(usage=usage, version='0.1')
    opts, args = parser.parse_args()
    if len(args) < 2 or "SUDO_USER" not in os.environ:
        parser.print_help()
        exit(1)

    resume_uid = args[0]
    launch_argv = args[1:]

    env = EnvMerge()
    path       = env.parent_envvar("PATH") or ""
    term       = env.parent_envvar("TERM") or ""
    display    = env.prefer_our_envvar("DISPLAY") or ""
    xauthority = env.prefer_our_envvar("XAUTHORITY") or ""

    rainbow_argv = [
      "/usr/sbin/rainbow-run",
      "-s", "/var/spool/rainbow/2",
      "-u", os.environ["SUDO_USER"],
      "-c", os.getcwd(),
      "-f", "0", "-f", "1", "-f", "2",
      "-E", "DISPLAY="+display,
      "-E", "XAUTHORITY="+xauthority,
      "-E", "PATH="+path,
      "-E", "TERM="+term,
      "-a", "/usr/bin/rainbow-xify",
      "-o", "audio",
      "-o", "network",
      "-r", resume_uid,
      "--"] + launch_argv

    return os.execv(rainbow_argv[0], rainbow_argv)

if __name__ == "__main__":
    main()