mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-26 20:12:44 +00:00
nuageinit: add test about encrypted passwords
Some checks are pending
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-14, /usr/lib/llvm-14/bin, ubuntu-22.04, bmake libarchive-dev clang-14 lld-14, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-14, /usr/lib/llvm-14/bin, ubuntu-22.04, bmake libarchive-dev clang-14 lld-14, arm64, aarch64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /opt/homebrew/opt/llvm@18/bin, macos-latest, bmake libarchive llvm@18, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /opt/homebrew/opt/llvm@18/bin, macos-latest, bmake libarchive llvm@18, arm64, aarch64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /usr/lib/llvm-18/bin, ubuntu-24.04, bmake libarchive-dev clang-18 lld-18, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /usr/lib/llvm-18/bin, ubuntu-24.04, bmake libarchive-dev clang-18 lld-18, arm64, aarch64) (push) Waiting to run
Some checks are pending
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-14, /usr/lib/llvm-14/bin, ubuntu-22.04, bmake libarchive-dev clang-14 lld-14, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-14, /usr/lib/llvm-14/bin, ubuntu-22.04, bmake libarchive-dev clang-14 lld-14, arm64, aarch64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /opt/homebrew/opt/llvm@18/bin, macos-latest, bmake libarchive llvm@18, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /opt/homebrew/opt/llvm@18/bin, macos-latest, bmake libarchive llvm@18, arm64, aarch64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /usr/lib/llvm-18/bin, ubuntu-24.04, bmake libarchive-dev clang-18 lld-18, amd64, amd64) (push) Waiting to run
Cross-build Kernel / ${{ matrix.target_arch }} ${{ matrix.os }} (${{ matrix.compiler }}) (clang-18, /usr/lib/llvm-18/bin, ubuntu-24.04, bmake libarchive-dev clang-18 lld-18, arm64, aarch64) (push) Waiting to run
While here fix fc34a2463c
where the
adduser_passwd.lua file was not added
This commit is contained in:
parent
3e50286607
commit
3e2a7a2cbe
20
libexec/nuageinit/tests/adduser_passwd.lua
Normal file
20
libexec/nuageinit/tests/adduser_passwd.lua
Normal file
@ -0,0 +1,20 @@
|
||||
#!/usr/libexec/flua
|
||||
|
||||
local n = require("nuage")
|
||||
|
||||
local pw = {}
|
||||
pw.name = "foo"
|
||||
pw.plain_text_passwd = "bar"
|
||||
local res = n.adduser(pw)
|
||||
if not res then
|
||||
n.err("valid user should return a path")
|
||||
end
|
||||
|
||||
local pw2 = {}
|
||||
pw2.name = "foocrypted"
|
||||
-- barcrypted
|
||||
pw2.passwd = "$6$ZY8faYcEfyoEZnNX$FuAZA2SKhIfYLebhEtbmjptQNrenr6mJhji35Ru.zqdaa6G/gkKiHoQuh0vYZTKrjaykyohR8W4Q5ZF56yt8u1"
|
||||
res = n.adduser(pw2)
|
||||
if not res then
|
||||
n.err("valid user should return a path")
|
||||
end
|
@ -60,6 +60,9 @@ adduser_passwd_body()
|
||||
passhash=`awk -F ':' '/^foo:/ {print $2}' etc/master.passwd`
|
||||
atf_check -s exit:0 -o inline:$passhash \
|
||||
$(atf_get_srcdir)/crypt $passhash "bar"
|
||||
passhash=`awk -F ':' '/^foocrypted:/ {print $2}' etc/master.passwd`
|
||||
atf_check -s exit:0 -o inline:$passhash \
|
||||
$(atf_get_srcdir)/crypt $passhash "barcrypted"
|
||||
}
|
||||
|
||||
addgroup_body()
|
||||
|
Loading…
Reference in New Issue
Block a user