Skip to content

parse: use "--" with systemd-escape#347

Merged
slyon merged 1 commit intocanonical:mainfrom
daniloegea:fix_systemd_escape
Apr 24, 2023
Merged

parse: use "--" with systemd-escape#347
slyon merged 1 commit intocanonical:mainfrom
daniloegea:fix_systemd_escape

Conversation

@daniloegea
Copy link
Contributor

@daniloegea daniloegea commented Apr 21, 2023

Strings starting with "-" will be interpreted as systemd-escape parameters.

Like in:

network:
  wifis:
    '--version':
      access-points:
        aasasd:
          password: "asdasdasdasd"
$ ./build/src/generate --root-dir /tmp/fakeroot3/
ERROR: cannot create file /run/systemd/system/netplan-wpa-systemd 252 (252.5-2ubuntu3)
+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -BPF_FRAMEWORK -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified.service: Failed to create file “/tmp/fakeroot3/run/systemd/system/netplan-wpa-systemd 252 (252.5-2ubuntu3)
+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -BPF_FRAMEWORK -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified.service.P99R31”: File name too long

Description

Checklist

  • Runs make check successfully.
  • Retains 100% code coverage (make check-coverage).
  • New/changed keys in YAML format are documented.
  • (Optional) Adds example YAML for new feature.
  • (Optional) Closes an open bug in Launchpad.

Strings starting with "-" will be interpreted as systemd-escape
parameters.
Copy link
Contributor

@slyon slyon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 lgtm

This is related to 56d628e (#338)

@slyon slyon merged commit e2dcc6e into canonical:main Apr 24, 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.

2 participants