mirror of
https://github.com/troglobit/finit.git
synced 2026-11-10 16:31:21 +00:00
1 parent
46bb09c331
commit
e9a89248ec
2 files changed
+10
-7
No files matched your search
+3
-7
@@ -23,18 +23,14 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <paths.h>
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <utmp.h>
|
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <sys/utsname.h>
|
#include <sys/utsname.h>
|
||||||
#include <lite/lite.h>
|
#include <lite/lite.h>
|
||||||
|
|
||||||
#include "helpers.h"
|
#include "helpers.h"
|
||||||
|
#include "util.h"
|
||||||
#ifndef _PATH_BTMP
|
#include "utmp-api.h"
|
||||||
#define _PATH_BTMP "/var/log/btmp"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MAX_NO 5
|
#define MAX_NO 5
|
||||||
#define MAX_SZ 100 * 1024
|
#define MAX_SZ 100 * 1024
|
||||||
@@ -128,7 +124,7 @@ void utmp_logrotate(void)
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (!has_utmp())
|
if (!has_utmp())
|
||||||
return 0;
|
return;
|
||||||
|
|
||||||
for (i = 0; files[i]; i++)
|
for (i = 0; files[i]; i++)
|
||||||
logrotate(files[i], MAX_NO, MAX_SZ);
|
logrotate(files[i], MAX_NO, MAX_SZ);
|
||||||
|
|||||||
@@ -24,6 +24,13 @@
|
|||||||
#ifndef FINIT_UTMP_API_H_
|
#ifndef FINIT_UTMP_API_H_
|
||||||
#define FINIT_UTMP_API_H_
|
#define FINIT_UTMP_API_H_
|
||||||
|
|
||||||
|
#include <paths.h>
|
||||||
|
#include <utmp.h>
|
||||||
|
|
||||||
|
#ifndef _PATH_BTMP
|
||||||
|
#define _PATH_BTMP "/var/log/btmp"
|
||||||
|
#endif
|
||||||
|
|
||||||
int utmp_set (int type, int pid, char *line, char *id, char *user);
|
int utmp_set (int type, int pid, char *line, char *id, char *user);
|
||||||
int utmp_set_boot (void);
|
int utmp_set_boot (void);
|
||||||
int utmp_set_halt (void);
|
int utmp_set_halt (void);
|
||||||
|
|||||||
Reference in new issue
Block a user