File: utmp_write.c

package info (click to toggle)
xitalk 1.1.11-4
  • links: PTS
  • area: main
  • in suites: slink
  • size: 824 kB
  • ctags: 588
  • sloc: ansic: 4,209; makefile: 184; sh: 102
file content (34 lines) | stat: -rw-r--r-- 603 bytes parent folder | download | duplicates (3)
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
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <pwd.h>

#include <X11/Xlib.h>

char pty_name[12]="/dev/ttyXX";
char *tty = pty_name + 5;


Display *temp_d=NULL;

void write_user_into_utmp(char *display)
	{
	/*
	struct passwd *my_pass;
	my_pass = getpwuid(getuid());
	Wtmp(my_pass->pw_name,tty+3,getpid(),USER_PROCESS,tty,DisplayString(temp_d));
	*/

	makeutent (tty, display );	
	}


void write_user_outof_utmp(void)
	{
	/*
	struct passwd *my_pass;
	my_pass = getpwuid(getuid());
	Wtmp(my_pass->pw_name,tty+3,getpid(),DEAD_PROCESS,tty,DisplayString(temp_d));
	*/
	cleanutent();	
	}