You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@vcl.apache.org by "Andy Kurth (JIRA)" <ji...@apache.org> on 2017/06/23 18:15:02 UTC
[jira] [Resolved] (VCL-1054) Windows.pm user_exists may return true
when user doesn't exist
[ https://issues.apache.org/jira/browse/VCL-1054?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andy Kurth resolved VCL-1054.
-----------------------------
Resolution: Fixed
> Windows.pm user_exists may return true when user doesn't exist
> --------------------------------------------------------------
>
> Key: VCL-1054
> URL: https://issues.apache.org/jira/browse/VCL-1054
> Project: VCL
> Issue Type: Bug
> Components: vcld (backend)
> Affects Versions: 2.4.2
> Reporter: Andy Kurth
> Assignee: Andy Kurth
> Fix For: 2.5
>
>
> Windows.pm::user_exists is only checking the exit status of the _net user_ command, not the output. If a user exists, the command should return an exit status of 0. If the user does not exist, it should return exit status 2.
> [~jfthomps] showed me a case where vcld.log was reporting exit status 0 (user exists) when the user did not exist:
> {noformat}
> 2017-06-23 12:50:11|8075|16|16|reinstall|Windows.pm:user_exists|1870|user admin exists on vm1-4, exit status: 0, output:
> |8075|16|16|reinstall|Windows.pm:user_exists|1870| The user name could not be found.
> |8075|16|16|reinstall|Windows.pm:user_exists|1870| More help is available by typing NET HELPMSG 2221.
> {noformat}
> I'm not sure why the exit status is incorrect. Regardless, the output should be checked to prevent this.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)