Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37562389
en ru br
ALT Linux repositórios
S:0.4-alt1

Group :: Sistema/Configurações/Rede
RPM: alterator-net-shares

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

pax_global_header00006660000000000000000000000064122074020320014502gustar00rootroot0000000000000052 comment=04813b7472ad7f72d9fe2678b4b79cbc271e1205
alterator-net-shares-0.3/000075500000000000000000000000001220740203200154065ustar00rootroot00000000000000alterator-net-shares-0.3/.gear-rules000064400000000000000000000000071220740203200174520ustar00rootroot00000000000000tar: .
alterator-net-shares-0.3/Makefile000064400000000000000000000001361220740203200170460ustar00rootroot00000000000000NAME=net-shares

include /usr/share/alterator/build/module.mak

all:
install: install-module

alterator-net-shares-0.3/alterator-net-shares.spec000064400000000000000000000023131220740203200223250ustar00rootroot00000000000000Name: alterator-net-shares
Version: 0.3
Release: alt1

Summary: Enable/disable mounting samba shares from "domain" server
License: GPL
Group: System/Configuration/Other

Source: %name-%version.tar
Packager: Anton V. Boyarshinov <boyarsh@altlinux.org>
BuildArch: noarch

Requires: gettext
Requires: bind-utils
Requires: alterator >= 2.9
BuildPreReq: alterator >= 3.1

%description
%summary

%prep
%setup -q

%build

%install
%makeinstall
%find_lang %name

%files -f %name.lang
%_datadir/alterator/applications/*
%_datadir/alterator/ui/*/
#%_datadir/alterator/help/ru_RU/*
/usr/lib/alterator/backend3/*

%changelog
* Wed Aug 28 2013 Anton V. Boyarshinov <boyarsh@altlinux.ru> 0.3-alt1
- ignore ipv6 addresses determening server name

* Thu Nov 15 2012 Anton V. Boyarshinov <boyarsh@altlinux.ru> 0.2-alt1
- adapted to "p7 domain"

* Thu Jun 09 2011 Anton V. Boyarshinov <boyarsh@altlinux.ru> 0.1-alt4
- dependence on bind-utils added

* Thu Apr 07 2011 Anton V. Boyarshinov <boyarsh@altlinux.ru> 0.1-alt3
- domain server address calculation fixed

* Wed Apr 06 2011 Anton V. Boyarshinov <boyarsh@altlinux.ru> 0.1-alt2
- debug output removed

* Fri Apr 01 2011 Anton V. Boyarshinov <boyarsh@altlinux.ru> 0.1-alt1
- initial build


alterator-net-shares-0.3/applications/000075500000000000000000000000001220740203200200745ustar00rootroot00000000000000alterator-net-shares-0.3/applications/net-shares.desktop000064400000000000000000000003761220740203200235460ustar00rootroot00000000000000[Desktop Entry]
Type=Application
Categories=X-Alterator-System
Icon=net-shares
Terminal=false
Name=Network shares
Name[ru_RU]=Сетевые каталоги
X-Alterator-URI=/net-shares
X-Alterator-Weight=20
X-Alterator-Help=net-shares
X-Alterator-UI=qt
alterator-net-shares-0.3/backend3/000075500000000000000000000000001220740203200170605ustar00rootroot00000000000000alterator-net-shares-0.3/backend3/net-shares000075500000000000000000000030101220740203200210510ustar00rootroot00000000000000#!/bin/sh

. alterator-sh-functions
alterator_api_version=1

read_avahi()
{
grep -Eqs '^<volume.*dnssd_lookup="1" mountpoint="/home/%\(USER\)/share"' /etc/security/pam_mount.conf.xml
}

read_homes()
{
grep -Eqs '^<volume.*path="homes" mountpoint="/home/%\(USER\)"' /etc/security/pam_mount.conf.xml
}

enable_avahi()
{
subst 's|</pam_mount>|<volume uid="5000-10000" fstype="cifs" dnssd_lookup="1" mountpoint="/home/%(USER)/share" options="sec=krb5,cruid=%(USERUID)" />\n</pam_mount>|' /etc/security/pam_mount.conf.xml

}

disable_avahi()
{
subst 's|^<volume.*dnssd_lookup="1" mountpoint="/home/%(USER)/share".*$||' /etc/security/pam_mount.conf.xml
}

enable_homes()
{
server=$(host $(host ldap | grep -v : | cut -d' ' -f4)| cut -d' ' -f5 | sed 's/\.$//')
subst 's|<pam_mount>|<pam_mount>\n<volume uid="5000-10000" fstype="cifs" server="'$server'" path="homes" mountpoint="/home/%(USER)" options="sec=krb5,cruid=%(USERUID)" />|' /etc/security/pam_mount.conf.xml

}

disable_homes()
{
subst 's|^<volume.*path="homes" mountpoint="/home/%(USER)".*$||' /etc/security/pam_mount.conf.xml
}


on_message() {
case "$in_action" in
read)
! system-auth status | grep -qs krb5
write_bool_param krb5 $?
! read_avahi
write_bool_param avahi $?
! read_homes
write_bool_param homes $?
;;
write)
if [ -n "$in_avahi" ]; then
read_avahi || enable_avahi
else
read_avahi && disable_avahi
fi
if [ -n "$in_homes" ]; then
read_homes || enable_homes
else
read_homes && disable_homes
fi
;;
esac
}

message_loop
alterator-net-shares-0.3/ui/000075500000000000000000000000001220740203200160235ustar00rootroot00000000000000alterator-net-shares-0.3/ui/net-shares/000075500000000000000000000000001220740203200200745ustar00rootroot00000000000000alterator-net-shares-0.3/ui/net-shares/index.scm000064400000000000000000000015631220740203200217140ustar00rootroot00000000000000(document:surround "/std/frame")

(define (ui-write)
(catch/message
(lambda()
(apply woo-write "/net-shares" (form-value-list))
(ui-read))))

(define (ui-read)
(form-update-value-list '("krb5" "avahi" "homes" )
(woo-read-first "/net-shares")))

(gridbox columns "50;0;50"
(spacer)
(gridbox columns "0;100"
(groupbox (_ "Mount shares for user on Kerberos logon:") colspan 2

(checkbox text (_"Common share") name "avahi")
(checkbox text (_"Home directory") name "homes")
(checkbox text (_"Kerberos") name "krb5" visibility #f)
(spacer)
(button name "apply" text (_ "Apply") align "left")
)))
(effect-disable "avahi" "krb5" #f)
(effect-disable "homes" "krb5" #f)


(document:root (when loaded
(ui-read)
(form-bind "apply" "click" ui-write)
(init-effect)
))
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009