summaryrefslogtreecommitdiffstats
path: root/src/msntab.c
blob: bcd30302fe5c724d25b96f926367b45c9fc5ee8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <stddef.h>
#include <assert.h>
#include "msntab.h"

struct tabentry* msntab_check_call(const char *callee, const char *caller) {
    static char *args[] = { "/bin/cat", NULL };
    static struct tabentry ca = { CALL_ACTION_ACCEPT, 1, args };
    
    return msntab_ref(&ca);
}


struct tabentry* msntab_ref(struct tabentry *t) {
    assert(t && t->ref_counter >= 1);
    t->ref_counter++;
    return t;
}

void msntab_unref(struct tabentry *t) {
    assert(t && t->ref_counter >= 1);
    t->ref_counter--;
}