mirror of
https://github.com/systemd/systemd.git
synced 2024-10-31 07:51:21 +03:00
homework: apply mount flags also for CIFS mounts
This commit is contained in:
parent
5971c318d4
commit
c9080dfb0b
@ -99,6 +99,11 @@ int home_setup_cifs(
|
|||||||
return log_error_errno(SYNTHETIC_ERRNO(ENOKEY),
|
return log_error_errno(SYNTHETIC_ERRNO(ENOKEY),
|
||||||
"Failed to mount home directory with supplied password.");
|
"Failed to mount home directory with supplied password.");
|
||||||
|
|
||||||
|
/* Adjust MS_SUID and similar flags */
|
||||||
|
r = mount_nofollow_verbose(LOG_ERR, NULL, HOME_RUNTIME_WORK_DIR, NULL, MS_BIND|MS_REMOUNT|user_record_mount_flags(h), NULL);
|
||||||
|
if (r < 0)
|
||||||
|
return r;
|
||||||
|
|
||||||
setup->root_fd = open(HOME_RUNTIME_WORK_DIR, O_RDONLY|O_CLOEXEC|O_DIRECTORY|O_NOFOLLOW);
|
setup->root_fd = open(HOME_RUNTIME_WORK_DIR, O_RDONLY|O_CLOEXEC|O_DIRECTORY|O_NOFOLLOW);
|
||||||
if (setup->root_fd < 0)
|
if (setup->root_fd < 0)
|
||||||
return log_error_errno(errno, "Failed to open home directory: %m");
|
return log_error_errno(errno, "Failed to open home directory: %m");
|
||||||
|
Loading…
Reference in New Issue
Block a user