[
https://issues.apache.org/jira/browse/VCL-1083?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16900245#comment-16900245
]
ASF subversion and git services commented on VCL-1083:
------------------------------------------------------
Commit 0e1f6f73bd2b568c9c7ed66812466a14df2ca327 in vcl's branch
refs/heads/VCL-1083_check_NFS_mounts_under_Linux_home_directories from Andrew
Kurth
[ https://gitbox.apache.org/repos/asf?p=vcl.git;h=0e1f6f7 ]
VCL-1083
Fixed logic problem in Linux.pm::delete_user introduced in previous commit to
prevent home directories on non-local disks from being deleted.
> Data in shares mounted under Linux home directories may be deleted
> ------------------------------------------------------------------
>
> Key: VCL-1083
> URL: https://issues.apache.org/jira/browse/VCL-1083
> Project: VCL
> Issue Type: Bug
> Components: vcld (backend)
> Affects Versions: 2.5
> Reporter: Andy Kurth
> Assignee: Andy Kurth
> Priority: Major
> Fix For: 2.5.1
>
>
> This issue mainly affects the new _Site Configuration > NFS Mounts_ feature
> introduced in VCL 2.5. This feature allows you to specify one or more shares
> to be automatically mounted on the computer prior to the user logging in.
> These shares get mounted when the computer is reserved. One of the main
> benefits of this feature is that it allows NFS shares to be mounted under the
> home directory of the local user created for the reservation.
> If the user never logs in to the reservation, the computer is _sanitized_
> rather than being fully reloaded under most circumstances. The
> _sanitization_ process involves deleting the local user account and
> associated home directory created for the user who never logged in.
> Unfortunately, in VCL 2.5 the call to delete the user account and the call to
> unmount any shares mounted for the _NFS Mounts_ feature are in the wrong
> order. An attempt is made to delete the user account first and then unmount
> the shares.
> This is sort of a problem because the Linux *userdel* command tries to
> recursively and indiscriminately delete the home directory and everything
> underneath when passed the *\-r* or *\-\-remove* argument. There's
> apparently no check to see if any shares are mounted. (This would make sense
> since the _userdel_ ultimately will fail if a share is mounted since it is
> unable to fully delete the home directory since it can't delete the mount
> point directory.) The end result is the home directory and mount point
> directory(ies) remain but everything underneath including files under the
> mounted share(s) that the local root account has write access to are deleted.
> The following appears in vcld.log when this problems occurs:
> {noformat}
> |timeout|Linux.pm:delete_user|3134| ---- WARNING ----
> |timeout|Linux.pm:delete_user|3134| 2017-11-15
> 15:15:26|timeout|Linux.pm:delete_user|3134|failed to delete user '<username>'
> from <computer>, command: '/usr/sbin/userdel -r <username>', exit status: 12,
> output:
> |timeout|Linux.pm:delete_user|3134| userdel: error removing directory
> /home/<username>
> |timeout|Linux.pm:delete_user|3134| ( 0) Linux.pm, delete_user (line: 3134)
> |timeout|Linux.pm:delete_user|3134| (-1) OS.pm, delete_user_accounts (line:
> 549)
> |timeout|Linux.pm:delete_user|3134| (-2) Linux.pm, sanitize (line: 1501)
> |timeout|Linux.pm:delete_user|3134| (-3) reclaim.pm, call_os_sanitize (line:
> 319)
> |timeout|Linux.pm:delete_user|3134| (-4) reclaim.pm, process (line: 190)
> |timeout|Linux.pm:delete_user|3134| (-5) vcld, make_new_child (line: 601)
> |timeout|Linux.pm:delete_user|3134| (-6) vcld, main (line: 353)
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)