Compare commits

...

3 Commits

Author SHA1 Message Date
Manuel Mascalzoni ee09f37e6b Cambiate password di dominio 2018-09-19 23:39:59 +02:00
Manuel Mascalzoni b7fb5d5c41 Merge remote-tracking branch 'origin/signed-fixes' into mozzecane 2018-09-19 23:06:05 +02:00
Emiliano Vavassori 2e594dcf5d Adding local signed fixes. 2016-11-25 03:10:28 +01:00
4 changed files with 72 additions and 6 deletions

View File

@ -1,7 +1,7 @@
$ANSIBLE_VAULT;1.1;AES256
34656463636239626332366464373337386539643933653433653362613238666330636334323465
6666373739386430643330666238366237646365623634370a363530303762373036616332313966
31343339373532346538393164373037396135633631653133663862316161373566633938386234
6366613030386432320a313262383838663262373037643138616131343337626234306436323462
64333262663662353836303365316433353463326664623838353339376164313235363339313238
3865613230306436346365623338366564346633343565623964
32366263646632613436323533303962643534303833393635386134333238313064376636363033
3033643462323066646536616261646339353739343165640a636136363937663436383031613864
63346563333739323433303039643861343263656530316531623532303564343131353538346538
3339353036393230660a313064343532313833363661653136626536383664333537316563366234
31333164626538336136666530616130373262386362356665613462653635393635653635313661
6639393566666236333063343032633039323935316339313330

View File

@ -0,0 +1,42 @@
#!/bin/bash
# Define a fix name. This will be used to check if the fix was already
# applied.
name=samba-downgrade_20161124.sh
# If already applied, skip
if [[ -f "/var/lib/topolin.ia/fixes/${name}.done" ]]; then
echo "Already fixed with ${name}. Skipping."
exit 0
fi
# Make the required modifications.
export DEBIAN_FRONTEND=noninteractive
apt-get install -q -y --force-yes \
-o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \
libsmbclient=2:4.3.11+dfsg-0ubuntu0.14.04.1 \
python-samba=2:4.3.11+dfsg-0ubuntu0.14.04.1 \
samba=2:4.3.11+dfsg-0ubuntu0.14.04.1 \
samba-common=2:4.3.11+dfsg-0ubuntu0.14.04.1 \
samba-common-bin=2:4.3.11+dfsg-0ubuntu0.14.04.1 \
samba-dsdb-modules=2:4.3.11+dfsg-0ubuntu0.14.04.1 \
samba-libs=2:4.3.11+dfsg-0ubuntu0.14.04.1 \
samba-vfs-modules=2:4.3.11+dfsg-0ubuntu0.14.04.1 \
smbclient=2:4.3.11+dfsg-0ubuntu0.14.04.1 \
libnss-winbind=2:4.3.11+dfsg-0ubuntu0.14.04.1 \
libpam-winbind=2:4.3.11+dfsg-0ubuntu0.14.04.1 \
libwbclient0=2:4.3.11+dfsg-0ubuntu0.14.04.1 \
winbind=2:4.3.11+dfsg-0ubuntu0.14.04.1
pkglist="libsmbclient python-samba samba-common samba-common-bin samba-dsdb-modules samba-libs samba-vfs-modules smbclient libnss-winbind libpam-winbind libwbclient0"
for pkg in ${pkglist}; do
apt-mark auto ${pkg}
apt-mark hold ${pkg}
done
# Once modified the system, ensure to create a check file to skip and not run
# it again if not needed.
mkdir -p /var/lib/topolin.ia/fixes
echo "$(date --iso | tr -d '-')" > /var/lib/topolin.ia/fixes/${name}.done

View File

@ -0,0 +1,18 @@
---
# Permits to apply per-site signed fixes automatically
#
# Prepare a script file, then crypt it with the Domain Administrator password:
# gpg -r info@bglug.it --symmetric --encrypt script.sh > script.sh.gpg
#
# Put the script within the server directory /var/lib/nethserver/ibay/ks/fixes
#
# List the file within domain.yml:
# apply_fixes:
# - script.sh.gpg
#
# Please see roles/prereq/files/samba-downgrade_20161124.sh as a template.
#
- name: Applying local signed fixes
shell: "/usr/bin/curl -sSL http://{{ ansible_local.domain.serverfqdn }}/ks/fixes/{{ item }} | /usr/bin/gpg --passphrase {{ domainadminpasswd }} --decrypt | sudo /bin/bash"
with_items: "{{ ansible_local.domain.apply_fixes|default([]) }}"

View File

@ -10,3 +10,9 @@
tags:
- prereq
- repos
- include: fixes.yml
tags:
- prereq
- fixes
when: ansible_local.domain.apply_fixes is defined