You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@vcl.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/11/16 23:24:00 UTC

[jira] [Commented] (VCL-1083) Data in shares mounted under Linux home directories may be deleted

    [ https://issues.apache.org/jira/browse/VCL-1083?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16256135#comment-16256135 ] 

ASF subversion and git services commented on VCL-1083:
------------------------------------------------------

Commit 407c44e1b1e3e56a8c05b32148c96010247e43a3 in vcl's branch refs/heads/master from [~arkurth]
[ https://git-wip-us.apache.org/repos/asf?p=vcl.git;h=407c44e ]

VCL-1083
Changed the order so NFS shares are unmounted before attempting to delete a local user on a Linux computer.

Added safety check prior to deleting any Linux user to determine if any NFS share are mounted under the user's home directory.


> 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
>             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
(v6.4.14#64029)