diff options
| author | beck <> | 2001-08-01 19:51:17 +0000 |
|---|---|---|
| committer | beck <> | 2001-08-01 19:51:17 +0000 |
| commit | 4b790f68539c49ef91f5e82506c2624900c92106 (patch) | |
| tree | d14ff9f79630cb04ad006cd2730646f44f62d786 /src/lib/libcrypto/rand/randfile.c | |
| parent | edbfd6c7e91e15e92ef0df548474ac76b6dddca0 (diff) | |
| download | openbsd-4b790f68539c49ef91f5e82506c2624900c92106.tar.gz openbsd-4b790f68539c49ef91f5e82506c2624900c92106.tar.bz2 openbsd-4b790f68539c49ef91f5e82506c2624900c92106.zip | |
merge openssl 0.9.6b-engine
Note that this is a maintenence release, API's appear *not* to have changed.
As such, I have only increased the minor number on these libraries
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/rand/randfile.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/libcrypto/rand/randfile.c b/src/lib/libcrypto/rand/randfile.c index f4376cf8cc..2ffb84c89e 100644 --- a/src/lib/libcrypto/rand/randfile.c +++ b/src/lib/libcrypto/rand/randfile.c | |||
| @@ -233,6 +233,12 @@ const char *RAND_file_name(char *buf, size_t size) | |||
| 233 | { | 233 | { |
| 234 | if (issetugid() == 0) | 234 | if (issetugid() == 0) |
| 235 | s=getenv("HOME"); | 235 | s=getenv("HOME"); |
| 236 | #ifdef DEFAULT_HOME | ||
| 237 | if (s == NULL) | ||
| 238 | { | ||
| 239 | s = DEFAULT_HOME; | ||
| 240 | } | ||
| 241 | #endif | ||
| 236 | if (s && *s && strlen(s)+strlen(RFILE)+2 < size) | 242 | if (s && *s && strlen(s)+strlen(RFILE)+2 < size) |
| 237 | { | 243 | { |
| 238 | strlcpy(buf,s,size); | 244 | strlcpy(buf,s,size); |
| @@ -242,7 +248,7 @@ const char *RAND_file_name(char *buf, size_t size) | |||
| 242 | strlcat(buf,RFILE,size); | 248 | strlcat(buf,RFILE,size); |
| 243 | ret=buf; | 249 | ret=buf; |
| 244 | } | 250 | } |
| 245 | else | 251 | else |
| 246 | buf[0] = '\0'; /* no file name */ | 252 | buf[0] = '\0'; /* no file name */ |
| 247 | } | 253 | } |
| 248 | 254 | ||
