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

tty: don't restore locking with --unprivileged #2238

Closed

Conversation

rst0git
Copy link
Member

@rst0git rst0git commented Aug 7, 2023

TIOCSLCKTRMIOS requires CAP_SYS_ADMIN. This causes criu restore to fail when used with --unprivileged.

TIOCSLCKTRMIOS requires CAP_SYS_ADMIN. This causes restore to fail when
CRIU is used in unprivileged mode.

Signed-off-by: Radostin Stoyanov <[email protected]>
@codecov-commenter
Copy link

Codecov Report

Patch coverage: 66.66% and project coverage change: -0.05% ⚠️

Comparison is base (72494ed) 70.65% compared to head (37b9396) 70.60%.

❗ Current head 37b9396 differs from pull request most recent head 2e84b58. Consider uploading reports for the commit 2e84b58 to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##           criu-dev    #2238      +/-   ##
============================================
- Coverage     70.65%   70.60%   -0.05%     
============================================
  Files           133      133              
  Lines         33317    33320       +3     
============================================
- Hits          23540    23527      -13     
- Misses         9777     9793      +16     
Files Changed Coverage Δ
criu/tty.c 77.46% <66.66%> (+0.02%) ⬆️

... and 6 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@avagin
Copy link
Member

avagin commented Aug 7, 2023

Pls add a full description what this ioctl is about and why it is safe to do what you are doing in this patch.

@avagin
Copy link
Member

avagin commented Aug 18, 2023

@rst0git ping

@rst0git
Copy link
Member Author

rst0git commented Aug 26, 2023

Pls add a full description what this ioctl is about and why it is safe to do what you are doing in this patch.

Thank you for the question. I investigated this further and while skipping TIOCSLCKTRMIOS for unprivileged restore seems to work, it might not be safe. Instead, it seems that allowing CAP_CHECKPOINT_RESTORE to be used with TIOCSLCKTRMIOS is more appropriate.

@rst0git rst0git closed this Aug 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants