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

Guest Apps might be executed with wrong UID/GID #1241

Closed
tedigh opened this Issue Jul 15, 2014 · 3 comments

Comments

Projects
None yet
4 participants
@tedigh

tedigh commented Jul 15, 2014

Spawner.h:prepareUserSwitching() might be called twice or more at the same time,
and it calls non-thread-safe functions -- getpwnam(), getgrnam() and their families.
They usually use and return same buffer among threads in Linux.

Adding the following lines at the top of prepareUserSwitching() is workaround for
this issue, but use of thread-safe variants of the functions such as getpwnam_r()
should be better solution.

static boost::mutex m;
boost::lock_guard<boost::mutex> l(m);

@FooBarWidget FooBarWidget added this to the 4.0.47 milestone Jul 15, 2014

@Wijnand

This comment has been minimized.

Show comment
Hide comment
@Wijnand

Wijnand Jul 16, 2014

I got bitten by this as well, application started as the wrong user so all kinds of permission problems prevented the app from working correctly.

Seems a very high priority issue to me.

Wijnand commented Jul 16, 2014

I got bitten by this as well, application started as the wrong user so all kinds of permission problems prevented the app from working correctly.

Seems a very high priority issue to me.

@danielwillemse

This comment has been minimized.

Show comment
Hide comment
@danielwillemse

danielwillemse Jul 17, 2014

Also ran into this exact same issue. Any chance this could be looked into?

danielwillemse commented Jul 17, 2014

Also ran into this exact same issue. Any chance this could be looked into?

@FooBarWidget

This comment has been minimized.

Show comment
Hide comment
@FooBarWidget

FooBarWidget Jul 17, 2014

Member

It's already marked as high priority.

Member

FooBarWidget commented Jul 17, 2014

It's already marked as high priority.

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