summaryrefslogtreecommitdiff
path: root/klibc_fixups.h
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2004-03-01 22:42:30 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:35:06 -0700
commit534c853df52810b63b126e7e43d051a682829464 (patch)
tree0159d5407ff445064abfa462847a865a05ef7705 /klibc_fixups.h
parent311e9ae68139083c801284a52f498c105d7c09f9 (diff)
[PATCH] add $local user spport for permissions
Diffstat (limited to 'klibc_fixups.h')
-rw-r--r--klibc_fixups.h47
1 files changed, 45 insertions, 2 deletions
diff --git a/klibc_fixups.h b/klibc_fixups.h
index 19bfd51caa..f6c91cdd94 100644
--- a/klibc_fixups.h
+++ b/klibc_fixups.h
@@ -1,7 +1,7 @@
#ifdef __KLIBC__
#ifndef KLIBC_FIXUPS_H
-#define KLIBC_FIXUPS_H
+#define KLIBC_FIXUPS_H
struct passwd {
char *pw_name; /* user name */
@@ -23,6 +23,49 @@ struct group {
struct passwd *getpwnam(const char *name);
struct group *getgrnam(const char *name);
-#endif
+#define UT_LINESIZE 32
+#define UT_NAMESIZE 32
+#define UT_HOSTSIZE 256
+#define USER_PROCESS 7 /* normal process */
+#define ut_time ut_tv.tv_sec
+
+
+extern int ufd;
+
+struct exit_status {
+ short int e_termination; /* process termination status */
+ short int e_exit; /* process exit status */
+};
+
+struct utmp
+{
+ short int ut_type; /* type of login */
+ pid_t ut_pid; /* pid of login process */
+ char ut_line[UT_LINESIZE]; /* devicename */
+ char ut_id[4]; /* Inittab id */
+ char ut_user[UT_NAMESIZE]; /* username */
+ char ut_host[UT_HOSTSIZE]; /* hostname for remote login */
+ struct exit_status ut_exit; /* exit status of a process marked as DEAD_PROCESS */
+ /* The ut_session and ut_tv fields must be the same size for 32 and 64-bit */
+#if __WORDSIZE == 64 && defined __WORDSIZE_COMPAT32
+ int32_t ut_session; /* sid used for windowing */
+ struct {
+ int32_t tv_sec; /* seconds */
+ int32_t tv_usec; /* microseconds */
+ } ut_tv;
+#else
+ long int ut_session;
+ struct timeval ut_tv;
#endif
+ int32_t ut_addr_v6[4]; /* internet address of remote host */
+ char __unused[20]; /* reserved for future use */
+};
+
+struct utmp *getutent(void);
+void setutent(void);
+void endutent(void);
+
+
+#endif /* KLIBC_FIXUPS_H */
+#endif /* __KLIBC__ */