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

This shouldn't use logname to determine ZUSER #36

Open
seanicus64 opened this issue Aug 7, 2018 · 4 comments
Open

This shouldn't use logname to determine ZUSER #36

seanicus64 opened this issue Aug 7, 2018 · 4 comments
Assignees
Milestone

Comments

@seanicus64
Copy link

logname tells you the user who originally opened the terminal, not the actual current user.

For example, the following user is a user named "fred" I "su'd" to under "sean". I also specified the user with the -u flag. But it still creates a vmdk in /home/sean.

fred@debian:~$ sudo vzvol -s 10m -t virtualbox -v virttest5 -u fred
creating a vzol of size
10m
Testing to ensure zvol was created
/dev/zd928
DIE
Creating /home/sean/VBoxdisks/virttest5.vmdk
RAW host disk access VMDK file /home/sean/VBoxdisks/virttest5.vmdk created successfully.
Please use /home/sean/VBoxdisks/virttest5.vmdk as your VM Disk
fred@debian:~$ logname
sean
@RainbowHackerHorse
Copy link
Owner

$logname was the best way I could come up with to resolve the matter for most use case scenarios.

However, -u SHOULD be overwriting it regardless.

Can you run the command again after adding
set -x under the shebang, and paste the output here?

@RainbowHackerHorse
Copy link
Owner

/dev/zd928
DIE

This is indicative of a further issue, so the output will also help me resolve another bug.

@adriaandegroot
Copy link

Under X11 (Plasma started from SDDM) on 11.2-STABLE, logname prints root when run from xterm or konsole. ssh'ing to localhost gets me the expected (not-root) username. So my vmdk's get created in /root instead of my own home dir. (Maybe running vzvol from a graphical environment on FreeBSD isn't one of your common use-cases, though)

@RainbowHackerHorse
Copy link
Owner

@adriaandegroot Definitely not a common use-case.
Under 11.2-RELEASE, in an LXDE environment, however, this issue isn't present. This leads me to believe that KDE is fucking something up.

@seanicus64 May I have that debug output please?

@RainbowHackerHorse RainbowHackerHorse self-assigned this Nov 2, 2018
@RainbowHackerHorse RainbowHackerHorse added this to the v0.7.1 milestone Sep 7, 2019
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

No branches or pull requests

3 participants