summaryrefslogtreecommitdiff
path: root/libexec/ld.so/sparc64
diff options
context:
space:
mode:
Diffstat (limited to 'libexec/ld.so/sparc64')
-rw-r--r--libexec/ld.so/sparc64/ldasm.S52
-rw-r--r--libexec/ld.so/sparc64/syscall.h24
2 files changed, 10 insertions, 66 deletions
diff --git a/libexec/ld.so/sparc64/ldasm.S b/libexec/ld.so/sparc64/ldasm.S
index 7871a31966b..a466cb5b260 100644
--- a/libexec/ld.so/sparc64/ldasm.S
+++ b/libexec/ld.so/sparc64/ldasm.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldasm.S,v 1.8 2002/03/15 14:52:39 drahn Exp $ */
+/* $OpenBSD: ldasm.S,v 1.9 2002/03/17 00:22:04 art Exp $ */
/* $NetBSD: rtld_start.S,v 1.5 2001/08/14 22:17:48 eeh Exp $ */
/*
@@ -240,50 +240,14 @@ _dl_exit:
.section ".text"
.align 4
- .global _dl_getegid
- .type _dl_getegid,@function
-_dl_getegid:
- mov SYS_getegid | SYSCALL_G2RFLAG, %g1 ! call sys_exit
- add %o7, 8, %g2 ! just return on sucess
- t ST_SYSCALL ! off to wonderland
- retl
- sub %g0, %o0, %o0 ! error: result = -errno
-
-
- .section ".text"
- .align 4
- .global _dl_geteuid
- .type _dl_geteuid,@function
-_dl_geteuid:
- mov SYS_geteuid | SYSCALL_G2RFLAG, %g1 ! call sys_exit
- add %o7, 8, %g2 ! just return on sucess
- t ST_SYSCALL ! off to wonderland
+ .global _dl_issetugid
+ .type _dl_issetugid,@function
+_dl_issetugid:
+ mov SYS_issetugid | SYSCALL_G2RFLAG, %g1
+ add %o7, 8, %g2
+ t ST_SYSCALL
retl
- sub %g0, %o0, %o0 ! error: result = -errno
-
-
- .section ".text"
- .align 4
- .global _dl_getgid
- .type _dl_getgid,@function
-_dl_getgid:
- mov SYS_getgid | SYSCALL_G2RFLAG, %g1 ! call sys_exit
- add %o7, 8, %g2 ! just return on sucess
- t ST_SYSCALL ! off to wonderland
- retl
- sub %g0, %o0, %o0 ! error: result = -errno
-
-
- .section ".text"
- .align 4
- .global _dl_getuid
- .type _dl_getuid,@function
-_dl_getuid:
- mov SYS_getuid | SYSCALL_G2RFLAG, %g1 ! call sys_exit
- add %o7, 8, %g2 ! just return on sucess
- t ST_SYSCALL ! off to wonderland
- retl
- sub %g0, %o0, %o0 ! error: result = -errno
+ sub %g0, %o0, %o0
.section ".text"
diff --git a/libexec/ld.so/sparc64/syscall.h b/libexec/ld.so/sparc64/syscall.h
index f5bcca662b9..9cc0b69ba14 100644
--- a/libexec/ld.so/sparc64/syscall.h
+++ b/libexec/ld.so/sparc64/syscall.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: syscall.h,v 1.4 2002/02/21 23:17:53 drahn Exp $ */
+/* $OpenBSD: syscall.h,v 1.5 2002/03/17 00:22:04 art Exp $ */
/*
* Copyright (c) 2001 Niklas Hallqvist
@@ -47,10 +47,7 @@
int _dl_close(int);
int _dl_exit(int);
-int _dl_getegid(void);
-int _dl_geteuid(void);
-int _dl_getgid(void);
-int _dl_getuid(void);
+int _dl_issetugid(void);
long _dl___syscall(quad_t, ...);
int _dl_mprotect(const void *, int, int);
int _dl_munmap(const void*, unsigned int);
@@ -61,22 +58,5 @@ int _dl_stat(const char *, struct stat *);
#endif
int _dl_write(int, const char*, int);
-/*
- * Not an actual syscall, but we need something in assembly to say
- * whether this is OK or not.
- */
-
-static inline int
-_dl_suid_ok (void)
-{
- unsigned int uid, euid, gid, egid;
-
- uid = _dl_getuid();
- euid = _dl_geteuid();
- gid = _dl_getgid();
- egid = _dl_getegid();
- return (uid == euid && gid == egid);
-}
-
#include <elf_abi.h>
#endif /*__DL_SYSCALL_H__*/