-
-
Notifications
You must be signed in to change notification settings - Fork 117
(WiP) zfs pool draft #289
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
(WiP) zfs pool draft #289
Changes from 1 commit
5b703db
39e6f53
ba9eada
87ef7c6
0b578df
4dc1273
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,6 +66,7 @@ async def _ask_password(self, receiving_cmd): | |
| if not self.app_reference: | ||
| # TODO this sucks, is there an easier way to get a reference to the | ||
| # global 'app' qubes.Qubes() instance? | ||
| self.log.warning("had no REFERENCE ETC to APP VARIABLE!!") | ||
| self.app_reference = qubes.Qubes() | ||
| pw_vm = self.app_reference.domains[self.ask_password_domain] | ||
| if not pw_vm: | ||
|
|
@@ -78,12 +79,30 @@ async def _ask_password(self, receiving_cmd): | |
| try: | ||
| # TODO how do we pass $1 to this stuff? we can pass **kwargs to | ||
| # asyncio.create_subprocess_exec, but we can't influence command | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Service calls can receive arguments after |
||
| await pw_vm.run_service_for_stdio( | ||
| 'qubes.AskPassword', | ||
| autostart=True, gui=True, | ||
| user='user', | ||
| input=self.name.encode()+b'\n', # context for the prompt | ||
| stdout=pw_pipe_out) | ||
| # await pw_vm.run_service_for_stdio( | ||
| # TODO THIS used to work, now it fucking broke. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you direct dom0, it needs R4.1 commit 50adc60. If you want to test on R4.0, you need to backport this commit.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That seems likely. It used to work on 4.0, but after updating earlier this week it stopped working with the exception that |
||
| # 'qubes.AskPassword', | ||
| # autostart=True, gui=True, | ||
| # user='user', | ||
| # input=self.name.encode()+b'\n', # context for the prompt | ||
| # stdout=pw_pipe_out) | ||
| # TODO instead for now: | ||
| environ = os.environ.copy() | ||
| environ["QREXEC_REMOTE_DOMAIN"] = "dom0" | ||
| environ["DISPLAY"] = ":0" | ||
| proc = await asyncio.create_subprocess_exec( | ||
| *['sudo','-Eiu','user', '/etc/qubes-rpc/qubes.AskPassword'], | ||
| stdout=pw_pipe_out, | ||
| stderr=subprocess.PIPE, | ||
| stdin=subprocess.PIPE, | ||
| close_fds=True, | ||
| env=environ, | ||
| ) | ||
| proc.stdin.write(self.name.encode()+b'\n') | ||
| await proc.stdin.drain() | ||
| # TODO flush aka drain+write_eof() apparently, wtf python | ||
| proc.stdin.write_eof() | ||
| await proc.wait() | ||
| except subprocess.CalledProcessError as e: | ||
| # TODO os.close(pw_pipe_in pw_pipe_out) | ||
| os.close(pw_pipe_in) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is definitely wrong. Every VM have
vm.appattribute - use that instead.