summaryrefslogtreecommitdiff
path: root/src/procman_matesu.cpp
blob: b7c08ad4dd6e4318f702de6d2aa612cdb55c6a24 (plain)
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
#include <config.h>

#include <glib.h>

#include "procman.h"
#include "procman_matesu.h"
#include "util.h"

gboolean (*matesu_exec)(const char *commandline);


static void
load_matesu(void)
{
    static gboolean init;

    if (init)
        return;

    init = TRUE;

    load_symbols("libmatesu.so.0",
             "matesu_exec", &matesu_exec,
             NULL);
}


gboolean
procman_matesu_create_root_password_dialog(const char *command)
{
    return matesu_exec(command);
}


gboolean
procman_has_matesu(void)
{
    load_matesu();
    return matesu_exec != NULL;
}