コード例 #1
0
static int
utmp_perform_login(struct logininfo *li)
{
	struct utmp ut;

	construct_utmp(li, &ut);
# ifdef UTMP_USE_LIBRARY
	if (!utmp_write_library(li, &ut)) {
		dropbear_log(LOG_WARNING, "utmp_perform_login: utmp_write_library() failed");
		return 0;
	}
# else
	if (!utmp_write_direct(li, &ut)) {
		dropbear_log(LOG_WARNING, "utmp_perform_login: utmp_write_direct() failed");
		return 0;
	}
# endif
	return 1;
}
コード例 #2
0
static int
utmp_perform_logout(struct logininfo *li)
{
	struct utmp ut;

	construct_utmp(li, &ut);
# ifdef UTMP_USE_LIBRARY
	if (!utmp_write_library(li, &ut)) {
		logit("utmp_perform_logout: utmp_write_library() failed");
		return 0;
	}
# else
	if (!utmp_write_direct(li, &ut)) {
		logit("utmp_perform_logout: utmp_write_direct() failed");
		return 0;
	}
# endif
	return 1;
}
コード例 #3
0
ファイル: loginrec.c プロジェクト: braincat/uwin
static int
utmp_perform_login(struct logininfo *li)
{
	struct utmp ut;

	construct_utmp(li, &ut);
# ifdef UTMP_USE_LIBRARY
	if (!utmp_write_library(li, &ut)) {
		logit("%s: utmp_write_library() failed", __func__);
		return (0);
	}
# else
	if (!utmp_write_direct(li, &ut)) {
		logit("%s: utmp_write_direct() failed", __func__);
		return (0);
	}
# endif
	return (1);
}