This file is indexed.

/usr/sbin/ntfs-config-root is in ntfs-config 1.0.1-10.

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
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
#! /usr/bin/python -OOt
# -*- python -*-
# -*- coding: UTF-8 -*-
#
#  ntfs-config-root : Execute ntfs-config as root. If you are not
#                      already root, search for an authentification program.
#  Copyright (C) 2007 Mertens Florent <flomertens@gmail.com>
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#

import os
import sys
import gettext
import logging
from subprocess import *

# Hack to make sure that path is set correctly when installation is in /usr/local
if "/usr/local" in sys.argv[0] :
    for path in sys.path :
        if "/usr/lib/python" in path :
            local_path = path.replace("/usr", "/usr/local")
            if not local_path in sys.path :
                sys.path.append(path.replace("/usr", "/usr/local"))
    if not "/usr/local/bin" in os.environ["PATH"] :
        os.environ["PATH"] += ":/usr/local/bin"


from NtfsConfig.Fstab.FstabDialogs import dialog
from NtfsConfig.config import *
from NtfsConfig.Utility import *
from gettext import gettext as _

if __name__ == '__main__' :
    
    logging.basicConfig(level=logging.INFO, format='%(levelname)s : %(message)s')
    gettext.bindtextdomain(PACKAGE,localedir)
    gettext.textdomain(PACKAGE)
  
    if not os.getuid() == 0 :
        desktop = get_desktop()
        if desktop == "GNOME" and test_cmd("gksu") :
            auth = "gksu"
        elif desktop == "KDE" and test_cmd("/usr/lib/kde4/libexec/kdesu") :
            auth = "/usr/lib/kde4/libexec/kdesu"
        elif test_cmd("gksu") :
            auth = "gksu"
        elif test_cmd("/usr/lib/kde4/libexec/kdesu") :
            auth = "/usr/lib/kde4/libexec/kdesu"   
        else :
            dialog("error", _("No authentication program founds"), \
                _("ntfs-config need to be run as root, but I can't find\n"
                "a graphical authentication program.\n" 
                "You should install <i>gksu</i> or <i>kdesu</i>.\n" 
                "Alternatively, you can run ntfs-config from "
                "the terminal with <i>su</i> or <i>sudo</i>."))
            sys.exit()
        logging.info("Launching %s with %s..." % (PACKAGE, auth))
        #os.putenv("%s_user-XAUTHORITY" % PACKAGE, os.environ["XAUTHORITY"])
        argv = [auth, "--", PACKAGE]
        argv.extend(sys.argv[1:])
        os.execvp(auth, argv)
    else :
        argv = [PACKAGE]
        argv.extend(sys.argv[1:])
        os.execvp(PACKAGE, argv)