Skip to content

Fix TigerVNC password file generation - #2

Open
Toetje585 wants to merge 1 commit into
binhex:masterfrom
Toetje585:fix/tigervnc-password-file
Open

Fix TigerVNC password file generation#2
Toetje585 wants to merge 1 commit into
binhex:masterfrom
Toetje585:fix/tigervnc-password-file

Conversation

@Toetje585

Copy link
Copy Markdown

Summary

Fix TigerVNC password-file generation in run/nobody/start.sh.

The previous implementation piped responses into the interactive vncpasswd
command, suppressed its output, and did not verify that the expected password
file was created.

During testing, startup reported that password setup was proceeding, but
/home/nobody/.config/tigervnc/passwd did not exist. Xvnc then logged:

[info] Password length OK, proceeding to set password...
SVncAuth: Opening password file '/home/nobody/.config/tigervnc/passwd'
          failed

The updated password-generation path:

  • Uses vncpasswd -f for non-interactive password generation.
  • Writes the generated password to a temporary file first.
  • Checks the vncpasswd exit status.
  • Verifies that the generated file is non-empty.
  • Applies mode 0600 to the password file.
  • Atomically moves the completed file into place.
  • Exits with a clear error when password generation fails.
  • Does not log the supplied password.

Checklist

  • Shell syntax validated with bash -n.
  • Diff validated with git diff --check.
  • Docker image rebuilt locally.
  • Container started successfully.
  • Password file created successfully.
  • Password file ownership and permissions verified.

owner=nobody group=users mode=600 size=8 path=/home/nobody/.config/tigervnc/passwd

  • Xvnc password-file error no longer present.

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.

1 participant