Lines Matching defs:utmp
42 * binary compatibility routines to support the old utmp interfaces
107 * prototypes for utmp compatibility routines (in getut.c)
109 extern struct utmp *_compat_getutent(void);
110 extern struct utmp *_compat_getutid(const struct utmp *);
111 extern struct utmp *_compat_getutline(const struct utmp *);
112 extern struct utmp *_compat_pututline(const struct utmp *);
115 extern void _compat_updwtmp(const char *, struct utmp *);
116 extern struct utmp *_compat_makeut(struct utmp *);
132 static struct utmp utmpcompat; /* Buffer for returning utmp-format data */
238 * or not. If MAXPID won't fit in a signed short, the utmp.ut_pid
268 * "getutent" gets the next entry in the utmp file.
270 struct utmp *
382 * "getutid" finds the specified entry in the utmp file. If
385 struct utmp *
386 getutid(const struct utmp *entry)
445 * "getutline" searches the "utmp" file for a LOGIN_PROCESS or
448 struct utmp *
449 getutline(const struct utmp *entry)
474 * to the /etc/utmp file.
503 * Convert the utmp struct to strings for command line arguments.
636 * If we are not the superuser than we can't write to /etc/utmp,
648 * utmp structures into the file incase the file is scribbled.)
698 * the utmp record to a utmpx record.
700 struct utmp *
701 pututline(const struct utmp *entry)
770 * and clears the utmp compatibility buffer.
833 * normal "utmp" file. If the file specified is "/var/adm/utmp"
835 * format name, and all "utmp" operations become wrapped calls
838 * an actual "old" utmp file (named something other than /var/adm/utmp),
840 * mode, where we actually call the old utmp routines to operate on
851 if (strcmp(newfile, "/var/adm/utmp") == 0 ||
887 * use the old utmp compatibility routine to write a utmp-format
891 updwtmp(const char *file, struct utmp *ut)
915 struct utmpx utmp; /* holding area */
916 struct utmpx *ucp = &utmp; /* and a pointer to it */
928 (void) memcpy(&utmp, utp, sizeof (utmp));
953 * modut - modify a utmp entry. Also notify init about new pids or
956 * args: utmp - point to utmp structure to be created
958 struct utmp *
959 modut(struct utmp *utp)
990 * allocid - allocate an unused id for utmp, either by recycling a
1147 makeutx(const struct utmpx *utmp)
1159 if (memchr(utmp->ut_id, _UTMP_ID_WILDCARD, _UTMP_ID_LEN) != NULL) {
1173 if (idcmp(utmp->ut_id, ut->ut_id)) {
1194 (void) memcpy((caddr_t)utmp->ut_id, ut->ut_id,
1197 putoneutx(utmp, offset);
1198 updwtmpx(WTMPX_FILE, (struct utmpx *)utmp);
1200 sendpid(ADDPID, (pid_t)utmp->ut_pid);
1201 return ((struct utmpx *)utmp);
1208 if (allocid((char *)utmp->ut_id, saveid)) {
1219 putoneutx(utmp, offset);
1220 updwtmpx(WTMPX_FILE, (struct utmpx *)utmp);
1222 sendpid(ADDPID, (pid_t)utmp->ut_pid);
1223 return ((struct utmpx *)utmp);
1227 utp = pututxline(utmp);
1231 sendpid(ADDPID, (pid_t)utmp->ut_pid);
1237 * makeut - create a utmp entry, recycling an id if a wild card is
1240 * args: utmp - point to utmp structure to be created
1242 struct utmp *
1243 makeut(struct utmp *utmp)
1249 return (_compat_makeut(utmp));
1251 getutmpx(utmp, &utmpx);
1255 getutmp(utmpx2, utmp);
1256 return (utmp);
1343 int pfd; /* file desc. for utmp pipe */
1347 * if for some reason utmp didn't open utmppipe, open it read/write
1361 * getutmpx - convert a utmp record into a utmpx record
1364 getutmpx(const struct utmp *ut, struct utmpx *utx)
1385 * getutmp - convert a utmpx record into a utmp record
1388 getutmp(const struct utmpx *utx, struct utmp *ut)