Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add error handling to proxy_connection #296

Open
2 tasks
alanking opened this issue Jan 14, 2025 · 2 comments
Open
2 tasks

Add error handling to proxy_connection #296

alanking opened this issue Jan 14, 2025 · 2 comments
Labels
Milestone

Comments

@alanking
Copy link
Contributor

  • main
  • 4-3-stable

At least 3 things can go wrong in this function and none of them are being handled:

auto make(const std::string clientUser = "", const std::string clientZone = "") -> rcComm_t*
{
rodsEnv env{};
_getRodsEnv(env);
conn = _rcConnect(
env.rodsHost,
env.rodsPort,
env.rodsUserName,
env.rodsZone,
!clientUser.empty() ?
clientUser.c_str() :
env.rodsUserName,
!clientZone.empty() ?
clientZone.c_str() :
env.rodsZone,
&err_msg,
0, 0);
clientLogin(conn);
return conn;
} // make

Make sure error cases are being checked and handled appropriately.

@alanking
Copy link
Contributor Author

Alternatively, as we move toward admin-only for all operations, we can probably just replace this entirely with client_connection and assume that the connection is privileged (i.e. use ADMIN_KW without checking authFlag in RcComm).

@korydraughn
Copy link
Collaborator

Agreed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants