|
Lines 74-79
Link Here
|
| 74 |
#include <openssl/err.h> |
74 |
#include <openssl/err.h> |
| 75 |
#include <openssl/fips.h> |
75 |
#include <openssl/fips.h> |
| 76 |
#include <fipscheck.h> |
76 |
#include <fipscheck.h> |
|
|
77 |
#include <selinux/selinux.h> |
| 77 |
#include "openbsd-compat/openssl-compat.h" |
78 |
#include "openbsd-compat/openssl-compat.h" |
| 78 |
#include "openbsd-compat/sys-queue.h" |
79 |
#include "openbsd-compat/sys-queue.h" |
| 79 |
|
80 |
|
|
Lines 848-857
main(int ac, char **av)
Link Here
|
| 848 |
*/ |
849 |
*/ |
| 849 |
r = snprintf(buf, sizeof buf, "%s%s%s", pw->pw_dir, |
850 |
r = snprintf(buf, sizeof buf, "%s%s%s", pw->pw_dir, |
| 850 |
strcmp(pw->pw_dir, "/") ? "/" : "", _PATH_SSH_USER_DIR); |
851 |
strcmp(pw->pw_dir, "/") ? "/" : "", _PATH_SSH_USER_DIR); |
| 851 |
if (r > 0 && (size_t)r < sizeof(buf) && stat(buf, &st) < 0) |
852 |
if (r > 0 && (size_t)r < sizeof(buf) && stat(buf, &st) < 0) { |
|
|
853 |
char *scon; |
| 854 |
|
| 855 |
matchpathcon(buf, 0700, &scon); |
| 856 |
setfscreatecon(scon); |
| 852 |
if (mkdir(buf, 0700) < 0) |
857 |
if (mkdir(buf, 0700) < 0) |
| 853 |
error("Could not create directory '%.200s'.", buf); |
858 |
error("Could not create directory '%.200s'.", buf); |
| 854 |
|
859 |
setfscreatecon(NULL); |
|
|
860 |
} |
| 855 |
/* load options.identity_files */ |
861 |
/* load options.identity_files */ |
| 856 |
load_public_identity_files(); |
862 |
load_public_identity_files(); |
| 857 |
|
863 |
|