summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/uid.c
diff options
context:
space:
mode:
authorjsing <>2014-04-15 13:42:55 +0000
committerjsing <>2014-04-15 13:42:55 +0000
commit179b5aba8054138fe6ae76eb86d0ba485fa99f67 (patch)
treef085d85cb06e6b6e1a1b1d52cced54d9f7d7e5f2 /src/lib/libcrypto/uid.c
parent91b7379546c278344ff2e20e9eb6ecec326f20cd (diff)
downloadopenbsd-179b5aba8054138fe6ae76eb86d0ba485fa99f67.tar.gz
openbsd-179b5aba8054138fe6ae76eb86d0ba485fa99f67.tar.bz2
openbsd-179b5aba8054138fe6ae76eb86d0ba485fa99f67.zip
First pass at applying KNF to the OpenSSL code, which almost makes it
readable. This pass is whitespace only and can readily be verified using tr and md5.
Diffstat (limited to 'src/lib/libcrypto/uid.c')
-rw-r--r--src/lib/libcrypto/uid.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/lib/libcrypto/uid.c b/src/lib/libcrypto/uid.c
index b1fd52bada..fcfa05ce0c 100644
--- a/src/lib/libcrypto/uid.c
+++ b/src/lib/libcrypto/uid.c
@@ -60,30 +60,32 @@
60 60
61#include OPENSSL_UNISTD 61#include OPENSSL_UNISTD
62 62
63int OPENSSL_issetugid(void) 63int
64 { 64OPENSSL_issetugid(void)
65{
65 return issetugid(); 66 return issetugid();
66 } 67}
67 68
68#elif defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_NETWARE) 69#elif defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_NETWARE)
69 70
70int OPENSSL_issetugid(void) 71int
71 { 72OPENSSL_issetugid(void)
73{
72 return 0; 74 return 0;
73 } 75}
74 76
75#else 77#else
76 78
77#include OPENSSL_UNISTD 79#include OPENSSL_UNISTD
78#include <sys/types.h> 80#include <sys/types.h>
79 81
80int OPENSSL_issetugid(void) 82int
81 { 83OPENSSL_issetugid(void)
82 if (getuid() != geteuid()) return 1; 84{
83 if (getgid() != getegid()) return 1; 85 if (getuid()
86 != geteuid()) return 1;
87 if (getgid()
88 != getegid()) return 1;
84 return 0; 89 return 0;
85 } 90}
86#endif 91#endif
87
88
89