microsoft / SCXcore

System Center Cross Platform Provider for Operations Manager
Microsoft Public License
36 stars 31 forks source link

Fixing the issue when omi user profile does not exist on system #87

Closed sarojcare closed 6 years ago

sarojcare commented 7 years ago

This change set includes

  1. Different way to handle the error cases in pbuild and product deployment environment.
  2. Calling new exception handler to print the exception appropriately. eg. "Calling getpwnam() with user name parameter "omi", returned an error with errno = 1(Operation not permitted )"
msftclas commented 7 years ago

@sarojcare, Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA. Thanks, Microsoft Pull Request Bot

sarojcare commented 7 years ago

The tavis failure is due to "SCXErrnoUserException" declaration in pal is not visible.

I have tried changing travis.yml so that it can be available. But no luck. I think it will be fixed automatically once we check in changes in pal branch.

sarojcare commented 7 years ago

Temporarily fixed Travis to pass all checks. Will revert back before check-in.

sarojcare commented 6 years ago

Do be sure to revert change to .travis.yml. I'm not actually 100% sure why you needed that anyway, care to enlighten me?

I had added the exceptions in pal branch and had decided so as all the exceptions used in scx_ssl_config.cpp are from the scxexception.cpp file in pal.

In travis.yml it is defined to use the 'pal' master branch due to which exception class added was not seen during compiling of scx_ssl_config.cpp. Due to this travis check was failing. Hence I have modified the travis.yml to checkout appropriate branch instead of master branch so that compilation will pass.

Now as you suggested I have moved the exception class added in pal to opsmgr and reverted back the changes in travis.