zonkyio / embedded-postgres

Java embedded PostgreSQL component for testing
Apache License 2.0
352 stars 47 forks source link

ensure unshare user has a valid name #84

Closed jameshilliard closed 2 years ago

jameshilliard commented 2 years ago

Prevents unshare wrapper from being used if the unshare wrapper user does not have a valid name as in #81.

tomix26 commented 2 years ago

Hi @jameshilliard, thanks very much for your contribution. I have just one question, wouldn't be possible to merge the new process builder with the previous one? Because both of these unshare commands seem quite similar to me.

jameshilliard commented 2 years ago

I have just one question, wouldn't be possible to merge the new process builder with the previous one?

Yeah, should be fine I think, updated to use previous process builder.

tomix26 commented 2 years ago

Yeah, should be fine I think, updated to use previous process builder.

I'm sorry, I wasn't clear enough. I meant to have only one invocation of the unshare command. So just modify the line 111 to have there builder.command("unshare", "-U", "id", "-un") without any following changes. Is this possible or not?

jameshilliard commented 2 years ago

So just modify the line 111 to have there builder.command("unshare", "-U", "id", "-un") without any following changes. Is this possible or not?

I don't think so, since we need id -u as well to verify the UID is not 0.

tomix26 commented 2 years ago

Ok, thanks for the explanation and of course also thanks for the PR. Great job, as always. I really appreciate it.