Changeset View
Changeset View
Standalone View
Standalone View
kcheckpass/kcheckpass.c
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Line(s) | |||||
56 | #include <stdlib.h> | 56 | #include <stdlib.h> | ||
57 | #include <errno.h> | 57 | #include <errno.h> | ||
58 | #include <time.h> | 58 | #include <time.h> | ||
59 | 59 | | |||
60 | #include <config-kscreenlocker.h> | 60 | #include <config-kscreenlocker.h> | ||
61 | #if HAVE_SYS_PRCTL_H | 61 | #if HAVE_SYS_PRCTL_H | ||
62 | #include <sys/prctl.h> | 62 | #include <sys/prctl.h> | ||
63 | #endif | 63 | #endif | ||
64 | #if HAVE_SYS_PROCCTL_H | ||||
65 | #include <unistd.h> | ||||
66 | #include <sys/procctl.h> | ||||
67 | #endif | ||||
68 | | ||||
64 | 69 | | |||
65 | /* Compatibility: accept some options from environment variables */ | 70 | /* Compatibility: accept some options from environment variables */ | ||
66 | #define ACCEPT_ENV | 71 | #define ACCEPT_ENV | ||
67 | 72 | | |||
68 | #define THROTTLE 3 | 73 | #define THROTTLE 3 | ||
69 | 74 | | |||
70 | static int havetty, sfd = -1, nullpass; | 75 | static int havetty, sfd = -1, nullpass; | ||
71 | 76 | | |||
▲ Show 20 Lines • Show All 253 Lines • ▼ Show 20 Line(s) | 325 | #endif | |||
325 | AuthReturn ret; | 330 | AuthReturn ret; | ||
326 | struct flock lk; | 331 | struct flock lk; | ||
327 | char fname[64], fcont[64]; | 332 | char fname[64], fcont[64]; | ||
328 | 333 | | |||
329 | // disable ptrace on kcheckpass | 334 | // disable ptrace on kcheckpass | ||
330 | #if HAVE_PR_SET_DUMPABLE | 335 | #if HAVE_PR_SET_DUMPABLE | ||
331 | prctl(PR_SET_DUMPABLE, 0); | 336 | prctl(PR_SET_DUMPABLE, 0); | ||
332 | #endif | 337 | #endif | ||
338 | #if HAVE_PROC_TRACE_CTL | ||||
339 | int mode = PROC_TRACE_CTL_DISABLE; | ||||
340 | procctl(P_PID, getpid(), PROC_TRACE_CTL, &mode); | ||||
rakuco: The indentation looks wrong here too. | |||||
341 | #endif | ||||
333 | 342 | | |||
334 | #ifdef HAVE_OSF_C2_PASSWD | 343 | #ifdef HAVE_OSF_C2_PASSWD | ||
335 | initialize_osf_security(argc, argv); | 344 | initialize_osf_security(argc, argv); | ||
336 | #endif | 345 | #endif | ||
337 | 346 | | |||
338 | /* Make sure stdout/stderr are open */ | 347 | /* Make sure stdout/stderr are open */ | ||
339 | for (c = 1; c <= 2; c++) { | 348 | for (c = 1; c <= 2; c++) { | ||
340 | if (fcntl(c, F_GETFL) == -1) { | 349 | if (fcntl(c, F_GETFL) == -1) { | ||
▲ Show 20 Lines • Show All 128 Lines • Show Last 20 Lines |
The indentation looks wrong here too.