summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmish2017-04-29 11:28:25 +0530
committerAmish2017-04-29 11:28:25 +0530
commitd9d7edd1df9d45b6f6e63003b7915ce3e9692d77 (patch)
tree2d09c1a4f881bb37c5ab84b8af62250e5e69adf0
parenta029145be5f140f24f1f733a873ee1f5da644a18 (diff)
downloadaur-d9d7edd1df9d45b6f6e63003b7915ce3e9692d77.tar.gz
Use PAM authentication - get rid of shadow hack
-rw-r--r--.SRCINFO11
-rw-r--r--PKGBUILD20
-rw-r--r--webmin.install21
-rw-r--r--webmin.pam5
4 files changed, 25 insertions, 32 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7eb742ac4a68..8bb8db74bfea 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,16 @@
pkgbase = webmin
pkgdesc = a web-based interface for system administration
pkgver = 1.831
- pkgrel = 2
+ pkgrel = 3
url = http://www.webmin.com/
- install = webmin.install
arch = i686
arch = x86_64
license = custom:webmin
- makedepends = perl-net-ssleay
depends = perl
- depends = perl-perl4-corelibs
+ depends = perl-net-ssleay
+ depends = perl-authen-pam
options = !strip
+ options = !zipman
backup = etc/webmin/miniserv.conf
backup = etc/webmin/miniserv.users
backup = etc/webmin/config
@@ -84,13 +84,16 @@ pkgbase = webmin
backup = etc/webmin/postfix/config
backup = etc/webmin/sendmail/config
backup = etc/webmin/proftpd/config
+ backup = etc/pam.d/webmin
source = http://downloads.sourceforge.net/sourceforge/webadmin/webmin-1.831.tar.gz
source = ftp://ftp.archlinux.org/other/webmin/webmin-config.tar.bz2
source = ftp://ftp.archlinux.org/other/webmin/webmin-pacman.tar.bz2
+ source = webmin.pam
source = webmin.service
sha256sums = b4cc63a369026e4e6d8f5af7501fe101dc122d9edbdd6bb20058f8f511694ce3
sha256sums = 52a512ae2aa2fdf4e8a2a26e6bedd5a9cf9aa3cb6ab3c13e6f37d0dc71fe22b3
sha256sums = 5f14a8396a3a9e920fae530b61d080e5d0c8bf57a7bd9e179c520a3b3a58ea38
+ sha256sums = a979e236681c6a06906937cf0f012e976347af5d6d7e7ae04a11acb01cc2689d
sha256sums = a1bdc68e3b0970a5c8e5063bd882b0469664ca782b34faecee22af5c6c30dd11
pkgname = webmin
diff --git a/PKGBUILD b/PKGBUILD
index 9971c8cdc781..39afc811a7c6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,12 +2,12 @@
pkgname=webmin
pkgver=1.831
-pkgrel=2
+pkgrel=3
pkgdesc="a web-based interface for system administration"
arch=(i686 x86_64)
license=('custom:webmin')
url="http://www.webmin.com/"
-depends=('perl' 'perl-net-ssleay')
+depends=('perl' 'perl-net-ssleay' 'perl-authen-pam')
backup=('etc/webmin/miniserv.conf' 'etc/webmin/miniserv.users' 'etc/webmin/config' \
'etc/webmin/pacman/config' \
'etc/webmin/at/config' \
@@ -78,11 +78,12 @@ backup=('etc/webmin/miniserv.conf' 'etc/webmin/miniserv.users' 'etc/webmin/confi
'etc/webmin/change-user/config' \
'etc/webmin/postfix/config' \
'etc/webmin/sendmail/config' \
-'etc/webmin/proftpd/config' )
-install=webmin.install
+'etc/webmin/proftpd/config' \
+'etc/pam.d/webmin' )
source=(http://downloads.sourceforge.net/sourceforge/webadmin/$pkgname-$pkgver.tar.gz
ftp://ftp.archlinux.org/other/webmin/webmin-config.tar.bz2
ftp://ftp.archlinux.org/other/webmin/webmin-pacman.tar.bz2
+ webmin.pam
webmin.service)
options=(!strip !zipman)
@@ -131,7 +132,7 @@ package() {
mkdir -p "$pkgdir"/etc/webmin
# install pam stuff
- install -D -m 644 webmin-pam "$pkgdir"/etc/pam.d/webmin
+ install -D -m 644 "$srcdir"/webmin.pam "$pkgdir"/etc/pam.d/webmin
# remove other distros and add only Archlinux don't change next line else it will not work!
rm os_list.txt
@@ -168,7 +169,7 @@ package() {
autoos=1
port=10000
login=root
- crypt="XXX"
+ crypt="x"
ssl=1
atboot=0
nostart=1
@@ -178,7 +179,8 @@ package() {
noperlpath=1
atbootyn=n
tempdir="$pkgdir"/tmp
- export config_dir var_dir perl autoos port tempdir login crypt ssl nochown autothird nouninstall nostart noperlpath atbootyn
+ pam=webmin
+ export config_dir var_dir perl autoos port tempdir login crypt ssl nochown autothird nouninstall nostart noperlpath atbootyn pam
# Fix setup.sh
sed -i -e 's:read atbootyn::g' -e 's:exit 13::g' "$pkgdir"/opt/webmin/setup.sh
@@ -188,6 +190,9 @@ package() {
sed -i 's:^pidfile=.*$:pidfile=/var/run/webmin.pid:' "$pkgdir"/etc/webmin/miniserv.conf
find "$pkgdir"/etc/webmin -type f -exec sed -i "s:$pkgdir::g" {} \;
+ # Use pam
+ echo -e 'pam_only=1\npam_end=1\npam_conv=\nno_pam=0' >> "$pkgdir"/etc/webmin/miniserv.conf
+
# install pacman menu
cd "$srcdir"/webmin-pacman/config
cp -rfp * "$pkgdir"/etc/webmin/pacman
@@ -207,4 +212,5 @@ package() {
sha256sums=('b4cc63a369026e4e6d8f5af7501fe101dc122d9edbdd6bb20058f8f511694ce3'
'52a512ae2aa2fdf4e8a2a26e6bedd5a9cf9aa3cb6ab3c13e6f37d0dc71fe22b3'
'5f14a8396a3a9e920fae530b61d080e5d0c8bf57a7bd9e179c520a3b3a58ea38'
+ 'a979e236681c6a06906937cf0f012e976347af5d6d7e7ae04a11acb01cc2689d'
'a1bdc68e3b0970a5c8e5063bd882b0469664ca782b34faecee22af5c6c30dd11')
diff --git a/webmin.install b/webmin.install
deleted file mode 100644
index 843625b53fa6..000000000000
--- a/webmin.install
+++ /dev/null
@@ -1,21 +0,0 @@
-# arg 1: the new package version
-post_install() {
- local crypt=$(grep "^root:" ${ROOT}/etc/shadow | cut -f 2 -d :)
- crypt=${crypt//\\/\\\\}
- crypt=${crypt//\//\\\/}
- sed -i "s/root:XXX/root:${crypt}/" /etc/webmin/miniserv.users
-
-cat << EOF
-Note:
-==> It is not allowed to install 3rd party modules, or delete existing modules.
-==> Please write your own PKGBUILDS for 3rd party modules and additional themes.
-Setup:
-==> Point your web browser to https://IPADDRESS:10000 to use webmin.
-EOF
-}
-
-# arg 1: the new package version
-# arg 2: the old package version
-post_upgrade() {
- post_install $1
-}
diff --git a/webmin.pam b/webmin.pam
new file mode 100644
index 000000000000..9d354b0b762d
--- /dev/null
+++ b/webmin.pam
@@ -0,0 +1,5 @@
+#%PAM-1.0
+auth include system-remote-login
+account include system-remote-login
+password include system-remote-login
+session include system-remote-login