IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
And split out the common code into a systemd_call() sub.
This connects to the systemd bus and waits for a UnitRemoved
event to occur for the specified unit, with an optional
timeout.
We'll use this in qemu-server to wait for a VM's scope to
disappear completely before trying to start a VM's scope
anew.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
instead of having it verbatim in the format string.
This enables us to have '%' in the defaulttext without getting errors
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
In older perl the following two where the same:
"$foo::$bar" == "${foo}::${bar}"
But in perl 5, version 28 it's not anymore,
"$foo::$bar" would be equivalent to "${foo::}${bar}", the double
colons are now not used as variable name boundary, so mark that
explicitly in the affected case and surrounding ones preventively
This fixes authentication with spice* related stuff again.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
If, somehow, someone passes a config to check_config with keys set
that are not in the options for that type, this fixed check
lead to autovivification, meaning that any future calls to the same
worker had an additional option for that type which is not optional
this lead to a wrongfully deleting of entries when updating an entry of
a different type, since all entries of the original types suddenly
did not satisfy their required options and would not get parsed
by read_file anymore (thus missing when a successful write_file was done)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
If the return schema says that it's optionally returns something then
we want to allow returning nothing, i.e., undef
Co-developed-by: Dominic Jäger <d.jaeger@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
this allows us to always show the 'address' the 'netmask' and the 'cidr'
both for ipv4 and ipv6
there is a small api change involved in one scenario:
if one manually changed the address to cidr format like
'10.0.0.4/24'
we now get from the api the parsed values
addr => 10.0.0.4
netmask => 24
cidr => 10.0.0.4/24
instead of
addr => 10.0.0.4/24
netmask =>
but i think that circumventing our api when writing the file, but still
relying on the api for reading is not a valid use case, i would argue
that we can change this, especially since we have a new field that
contains that information again (cidr)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
See `man 2 setresuid`. The code was tested with small UIDs (109) and
one which does not fit into 16 bit (100000000), since I wasn't too
sure about the workings of setresuid vs. setresuid32 (see NOTES of
the manpage) - it worked with both.
Linux on amd64 has only a single setresuid, as it the 64 bit arch
came after the setresuid32 syscall, and thus it started with the
later one as single common one
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
move it from qemu-server as it was also used in pve-container and
pve-manager (pvesr), while guest-commons AbstractConfig could be a
fit too, just move it here as all depending on this already use
JSONSchema and it just fits here...
Break respective qemu-server version
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
MAC-addresses having the LSB of the first octet set, are considered
multicast-addresses (see [0,1]).
the 'mac-addr' format got changed to only permit unicast addresses, which should
work for its current use-case (WOL for nodes).
additionally a default option was registered via register_standard_option to be
used in both PVE::LXC::Config and PVE::QemuServer.
[0] https://lists.linuxcontainers.org/pipermail/lxc-users/2010-August/000783.html
[1] https://en.wikipedia.org/wiki/MAC_address
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
now allows:
* addresses without tld (f.e. user@localhost per bug)
* remove limits for number of subdomains
* allow +, -, ~ in local part
* disallow double dots (.. .a. etc) and dots in the end (abc.@mail.com)
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Acked-by: Dominik Csapak <d.csapak@proxmox.com>
This adds the function needed to generate the zsh autocompletion scripts.
Using the bash completion code path, this generates the list of possible
completions and adds them to the zsh completion by compadd.
For the autocompletion scripts to be loaded automatically, the following two
lines have to be placed in the .zshrc:
autoload -U compinit
compinit
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
used by the ACME standalone challenge.
these were previously already depended on by pve-manager, where they were
recently removed - exposing the fact they are in fact required by
libpve-common-perl.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Extract major/minor from `dev_t` values as found in stat()
calls, with support for the full 32 bit values.
The device value returned by stat() is 32 bits long and encoded as
high 12 bit of the minor value as in the 12 MSBs, 12 bit major value,
then the low 8 bit of the minor value in the low byte.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>