pax_global_header 0000666 0000000 0000000 00000000064 12230237122 0014504 g ustar 00root root 0000000 0000000 52 comment=fd8b7b21d47f4c9d9697bbfc2fa2c8687722350f
installer-feature-network-shares-client-0.9/ 0000755 0000000 0000000 00000000000 12230237122 0021226 5 ustar 00root root 0000000 0000000 installer-feature-network-shares-client-0.9/.gear-rules 0000644 0000000 0000000 00000000007 12230237122 0023272 0 ustar 00root root 0000000 0000000 tar: .
installer-feature-network-shares-client-0.9/70-network-shares-dhcpcd.sh 0000755 0000000 0000000 00000000421 12230237122 0026205 0 ustar 00root root 0000000 0000000 #!/bin/sh -efu
. install2-init-functions
dhcpcd_conf='/etc/dhcpcd.conf'
[ ! -f "$destdir$dhcpcd_conf" ] || \
grep -q '^option[[:blank:]]\+vendor_encapsulated_options' "$destdir$dhcpcd_conf" || \
echo 'option vendor_encapsulated_options' >> "$destdir$dhcpcd_conf" installer-feature-network-shares-client-0.9/70-network-shares-samba.sh 0000755 0000000 0000000 00000006164 12230237122 0026055 0 ustar 00root root 0000000 0000000 #!/bin/sh -efu
##
# This scrip do:
# 1) update pam_mount configuration
# 2) update pam configuration
# 3) grant anybody access to cifsmount & cifsumount
#
# Notice:
# Network shares auto mounted only for members of `users' group.
. shell-error
. install2-init-functions
#msg() {
# printf "$* \n"
#}
pmconf="$destdir/etc/security/pam_mount.conf.xml"
pamconf="$destdir/etc/pam.d/system-auth-krb5"
##
# Update pam_mount configuration file
#
update_pmconf() {
local insert_at tmp_conf
tmp_conf="${pmconf}.new"
if ! [ -w "$pmconf" ]; then
msg "Can't find writable $pmconf. Did you install pam_mount package?"
return 1
fi
grep -qs dnssd_lookup "$pmconf" 2>/dev/null
if [ "$?" = "0" ]; then
msg "Suppose you already configured pam_mount. Do nothing."
return 0
fi
msg "Insert settings to $pmconf to use avahi."
insert_at="$(sed -n '//=' "$pmconf" | head -n 1)"
if [ -z "$insert_at" ]; then
msg "Can't find position for injection in $pmconf"
return 1
fi
# part 1 (head)
head -n $((insert_at-1)) "$pmconf" > "$tmp_conf"
# part 2 (inserted text)
cat >> "$tmp_conf" <<'__EOF__'
/sbin/mount.cifs //%(SERVER)/%(VOLUME) %(MNTPT) -o %(OPTIONS)
/sbin/umount %(MNTPT)
__EOF__
# part 3 (tail)
sed -n "$insert_at,\$p" "$pmconf" >> "$tmp_conf"
# Update config
mv -f "$tmp_conf" "$pmconf"
chown root.root "$pmconf"
chmod 644 "$pmconf"
# XXX: REMOVE FOR RELEASE
# sed -i -e '/debug enable/ s/0/1/' "$pmconf"
}
##
# Update pam configuration
#
update_pam() {
local append_after
if ! [ -w "$pamconf" ]; then
msg "Can't find writable $pamconf"
return 1
fi
if [ -L "$pamconf" ]; then
pamconf="${pamconf/$(basename $pamconf)/}$(readlink "$pamconf")"
fi
if grep -qs pam_mount "$pamconf"; then
msg "Suppose you already configured pam for using pam_mount. Do nothing."
return 0
fi
msg "Insert settings to $pamconf to use pam_mount."
append_after="$(sed -n '/^auth[[:space:]]\+required/=' "$pamconf" | tail -n 1)"
test -n "$append_after" && sed -i -e "$append_after a auth optional pam_mount.so" "$pamconf"
append_after="$(sed -n '/^session[[:space:]]\+required/=' "$pamconf" | tail -n 1)"
test -n "$append_after" && sed -i -e "$append_after a session optional pam_mount.so" "$pamconf"
append_after="$(sed -n '/^auth[[:space:]]\+required/=' "$pamconf"_ccreds | tail -n 1)"
test -n "$append_after" && sed -i -e "$append_after a auth optional pam_mount.so" "$pamconf"_ccreds
msg "Set ccache to predicadable value."
subst 's|pam_krb5.so use_first_pass$|pam_krb5.so use_first_pass ccache=/tmp/krb5cc_%u|' "$pamconf"
}
##
# Start
#
update_pmconf &&
update_pam
installer-feature-network-shares-client-0.9/70-nscd.sh 0000755 0000000 0000000 00000000175 12230237122 0022743 0 ustar 00root root 0000000 0000000 #!/bin/sh
. install2-init-functions
subst 's/\(positive-time-to-live[^0-9]*\)[0-9]*$/\1 31536000/g' $destdir/etc/nscd.conf
installer-feature-network-shares-client-0.9/installer-feature-network-shares-client.spec 0000644 0000000 0000000 00000004564 12230237122 0031767 0 ustar 00root root 0000000 0000000 Name: installer-feature-network-shares-client
Version: 0.9
Release: alt3
%define hookdir %_datadir/install2/postinstall.d
%add_findreq_skiplist %hookdir/*
Summary: Installer stage3 NFS/SMB/FTP shares hooks (client side)
License: GPL
Group: System/Configuration/Other
Url: http://www.altlinux.org/Installer/beans
BuildArch: noarch
Source: %name-%version.tar
%description
%summary
%package stage3
Summary: %summary
Group: System/Configuration/Other
Requires: coreutils libshell sed
%description stage3
This package contains installer stage2 hooks for SMB and FTP services (client side).
%prep
%setup
%install
%define hookdir %_datadir/install2/postinstall.d
mkdir -p %buildroot/%hookdir
install -pm755 *.sh %buildroot/%hookdir/
%files stage3
%hookdir/*
%changelog
* Fri Oct 18 2013 Anton V. Boyarshinov 0.9-alt3
- usage of unexistent umount.cifs removed
* Fri Nov 30 2012 Anton V. Boyarshinov 0.9-alt2
- add 'auth..pam_mount' also to krb5_ccreds
* Thu Nov 29 2012 Anton V. Boyarshinov 0.9-alt1
- nscd configuration for pam_ccreds added
* Thu Nov 29 2012 Anton V. Boyarshinov 0.8-alt3
- unneded controls removing fixed
* Thu Nov 22 2012 Anton V. Boyarshinov 0.8-alt2
- unneded controls removed
* Wed Nov 07 2012 Anton V. Boyarshinov 0.8-alt1
- use root mount and cruid parameter to work with new cifs-utils
* Fri Mar 25 2011 Anton V. Boyarshinov 0.7-alt3
- path to u?mount.cifs fixed
* Fri Mar 18 2011 Anton V. Boyarshinov 0.7-alt2
- always hack system-auth-krb5, not default
* Thu Sep 30 2010 Anton V. Boyarshinov 0.7-alt1
- no secure NFS from the box
* Tue Aug 11 2009 Anton V. Boyarshinov 0.6-alt1
- set krb5 ccache to predicadable value
- really fixed update_pam()
* Mon Aug 10 2009 Mikhail Efremov 0.5-alt1
- fixed update_pam().
- use krb5 by default for cifs.
* Wed Jun 24 2009 Andriy Stepanov 0.4-alt1
- don't harmful symbolic link (Closes: #20548)
* Wed May 06 2009 Andriy Stepanov 0.3-alt1
- use uid="5000-10000" instead sgrp="users"
* Mon Apr 27 2009 Andriy Stepanov 0.2-alt1
- Add $dest_dir & exec_chroot
* Wed Apr 22 2009 Andriy Stepanov 0.1-alt1
- Initial build.