Accepting request 79148 from home:computersalat:devel:proxy

fix bnc#710275

OBS-URL: https://build.opensuse.org/request/show/79148
OBS-URL: https://build.opensuse.org/package/show/server:proxy/cntlm?expand=0&rev=14
This commit is contained in:
Christian Wittmer 2011-08-17 17:16:33 +00:00 committed by Git OBS Bridge
parent 9776d841cf
commit d4bb8168c9
4 changed files with 36 additions and 25 deletions

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Wed Aug 17 17:00:28 UTC 2011 - chris@computersalat.de
- fix bnc#710275
* /var/run/cntlm -> tmpfs (created by init script)
- spec cleanup
- set defaults in sysconfig
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Aug 4 15:10:10 UTC 2011 - coolo@novell.com Thu Aug 4 15:10:10 UTC 2011 - coolo@novell.com

View File

@ -55,7 +55,6 @@ test -r $cntlm_sysconfig || { echo "$cntlm_sysconfig not existing";
# some defaults # some defaults
cntlm_desc="CNTLM Authentication Proxy" cntlm_desc="CNTLM Authentication Proxy"
cntlm_pid="/var/run/cntlm/cntlmd.pid" cntlm_pid="/var/run/cntlm/cntlmd.pid"
cntlm_lock="/var/lock/subsys/cntlm"
cntlm_user="-U ${CNTLM_USER:=cntlm}" cntlm_user="-U ${CNTLM_USER:=cntlm}"
cntlm_opts=${CNTLM_OPTS:=""} cntlm_opts=${CNTLM_OPTS:=""}
@ -66,6 +65,11 @@ else
cntlm_listen="-l ${CNTLM_LISTEN:=127.0.0.1:3128}" cntlm_listen="-l ${CNTLM_LISTEN:=127.0.0.1:3128}"
fi fi
# check for pid_dir
[ ! -d /var/run/cntlm ] && {
install -d -m0755 -o ${CNTLM_USER:=cntlm} -g root /var/run/cntlm;
}
# Source LSB init functions # Source LSB init functions
# providing start_daemon, killproc, pidofproc, # providing start_daemon, killproc, pidofproc,
# log_success_msg, log_failure_msg and log_warning_msg. # log_success_msg, log_failure_msg and log_warning_msg.

View File

@ -1,7 +1,7 @@
# #
# spec file for package cntlm (Version 0.35.1) # spec file for package cntlm
# #
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2007 Scorpio IT, Deidesheim, Germany # Copyright (c) 2007 Scorpio IT, Deidesheim, Germany
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
@ -16,14 +16,12 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
# norootforbuild
Name: cntlm Name: cntlm
Summary: Fast NTLM authentication proxy with tunneling Summary: Fast NTLM authentication proxy with tunneling
Version: 0.35.1 Version: 0.35.1
Release: 1 Release: 1
License: GNU GPL V2 License: GPLv2
Group: Productivity/Networking/Web/Proxy Group: Productivity/Networking/Web/Proxy
Url: http://cntlm.sourceforge.net/ Url: http://cntlm.sourceforge.net/
Source0: %{name}-%{version}.tar.bz2 Source0: %{name}-%{version}.tar.bz2
@ -56,22 +54,22 @@ contains detailed information.
MANDIR=%{_mandir} MANDIR=%{_mandir}
%install %install
%makeinstall SYSCONFDIR=$RPM_BUILD_ROOT/%{_sysconfdir} \ %makeinstall SYSCONFDIR=%{buildroot}/%{_sysconfdir} \
BINDIR=$RPM_BUILD_ROOT/%{_sbindir} \ BINDIR=%{buildroot}/%{_sbindir} \
MANDIR=$RPM_BUILD_ROOT/%{_mandir} MANDIR=%{buildroot}/%{_mandir}
%{__install} -d $RPM_BUILD_ROOT/var/run/%{name} %{__install} -d %{buildroot}/var/run/%{name}
%{__install} -D -m 755 %{S:1} $RPM_BUILD_ROOT/%{_initrddir}/%{name} %{__install} -D -m 755 %{S:1} %{buildroot}/%{_initrddir}/%{name}
%{__ln_s} -f ../..%{_sysconfdir}/init.d/%{name} ${RPM_BUILD_ROOT}/usr/sbin/rc%{name} %{__ln_s} -f ../..%{_sysconfdir}/init.d/%{name} %{buildroot}/usr/sbin/rc%{name}
%{__install} -D -m 644 %{S:2} $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.%{name} %{__install} -D -m 644 %{S:2} %{buildroot}/var/adm/fillup-templates/sysconfig.%{name}
%pre %pre
# on `rpm -ivh` PARAM is 1 # on `rpm -ivh` PARAM is 1
# on `rpm -Uvh` PARAM is 2 # on `rpm -Uvh` PARAM is 2
# user cntlm # user cntlm
if [ -z "`%{_bindir}/getent passwd "%{name}"`" ]; then if [ -z "`%{_bindir}/getent passwd "%{name}"`" ]; then
%{_sbindir}/useradd -c "CNTLM Proxy Auth" -d /var/run/%{name} -g nogroup \ %{_sbindir}/useradd -c "CNTLM Proxy Auth" -d /var/run/%{name} -g nogroup \
-r -s /bin/false %{name} 2>/dev/null; -r -s /bin/false %{name} 2>/dev/null;
fi fi
%preun %preun
# on `rpm -e` PARAM is 0 # on `rpm -e` PARAM is 0
@ -91,7 +89,7 @@ contains detailed information.
%{insserv_cleanup} %{insserv_cleanup}
%clean %clean
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && %{__rm} -rf $RPM_BUILD_ROOT %{__rm} -rf %{buildroot}
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
@ -100,7 +98,7 @@ contains detailed information.
%config(noreplace) %{_initrddir}/%{name} %config(noreplace) %{_initrddir}/%{name}
%{_sbindir}/* %{_sbindir}/*
%{_mandir}/man1/%{name}.1* %{_mandir}/man1/%{name}.1*
%dir %attr(755,%{name},root) /var/run/%{name} %ghost %dir %attr(755,%{name},root) /var/run/%{name}
/var/adm/fillup-templates/sysconfig.%{name} /var/adm/fillup-templates/sysconfig.%{name}
%changelog %changelog

View File

@ -4,7 +4,10 @@
## Type: string ## Type: string
## Default: "cntlm" ## Default: "cntlm"
# #
CNTLM_USER="" # -U <uid>
# Run as uid. It is an important security measure not to run as root.
#
CNTLM_USER="cntlm"
## Type: string ## Type: string
## Default: "" ## Default: ""
@ -42,8 +45,6 @@ CNTLM_USER=""
# -S <size_in_kb> # -S <size_in_kb>
# Enable transparent handler of ISA AV scanner plugin for files up to size_in_kb KiB. # Enable transparent handler of ISA AV scanner plugin for files up to size_in_kb KiB.
# -s Do not use threads, serialize all requests - for debugging only. # -s Do not use threads, serialize all requests - for debugging only.
# -U <uid>
# Run as uid. It is an important security measure not to run as root.
# -u <user>[@<domain] # -u <user>[@<domain]
# Domain/workgroup can be set separately. # Domain/workgroup can be set separately.
# -v Print debugging information. # -v Print debugging information.
@ -58,5 +59,5 @@ CNTLM_OPTS=""
# -l [<saddr>:]<lport> # -l [<saddr>:]<lport>
# Main listening port for the NTLM proxy. # Main listening port for the NTLM proxy.
# #
CNTLM_LISTEN="" CNTLM_LISTEN="127.0.0.1:3128"