Hello community,

here is the log from the commit of package cifs-utils.1708 for 
openSUSE:12.3:Update checked in at 2013-06-11 14:54:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.3:Update/cifs-utils.1708 (Old)
 and      /work/SRC/openSUSE:12.3:Update/.cifs-utils.1708.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cifs-utils.1708"

Changes:
--------
New Changes file:

--- /dev/null   2013-06-08 20:45:13.000037006 +0200
+++ /work/SRC/openSUSE:12.3:Update/.cifs-utils.1708.new/cifs-utils.changes      
2013-06-11 14:54:41.000000000 +0200
@@ -0,0 +1,6207 @@
+-------------------------------------------------------------------
+Thu Mar 21 10:46:51 UTC 2013 - [email protected]
+
+- Added url as source.
+  Please see http://en.opensuse.org/SourceUrls
+
+-------------------------------------------------------------------
+Tue Feb 26 12:07:11 UTC 2013 - [email protected]
+
+- Add cifstab named configuration file to post-12.2 systems; (bnc#804822);
+  (bnc#821889).
+- Really use of the existing cifs init script; (bnc#697218).
+
+-------------------------------------------------------------------
+Wed Feb 21 10:34:55 UTC 2013 - [email protected]
+
+- Remove superfluous restart or stop of the cifs service; (bnc#804822).
+
+-------------------------------------------------------------------
+Wed Jan 23 11:06:31 UTC 2013 - [email protected]
+
+- Set parsed_info->got_user when a cred file supplies a username;
+  (bnc#800018).
+
+-------------------------------------------------------------------
+Wed Jan 16 14:51:39 UTC 2013 - [email protected]
+
+- Update to cifs-utils 5.9.
+  + new plugin architecture for the ID mapping tools
+  + DOMAIN\username@password format for username= arguments is removed
+  + full RELRO (vs. partial) is now enabled on all binaries
+
+-------------------------------------------------------------------
+Wed Nov 21 04:03:45 UTC 2012 - [email protected]
+
+- Version 5.8
+* NFS-style device names are being deprecated in 6.0.
+* Many bugs in cifs.idmap, getcifsacl and setcifsacl have been fixed.
+
+-------------------------------------------------------------------
+Wed Aug  8 17:09:22 UTC 2012 - [email protected]
+
+- Update to cifs-utils 5.6.
+  + -Werror has been removed by default from CFLAGS
+  + PIE and RELRO are enabled by default at build time
+  + better integration with systemd by allowing the use of
+    /bin/systemd-ask-password if available
+  + better checks and warnings from cifscreds when used in environments that
+    do not have a session keyring
+- No longer initialize oldfsgid inside acquire_mountpoint() of mount.cifs.c as
+  -Werror got removed.
+
+-------------------------------------------------------------------
+Tue Jun 12 20:05:38 UTC 2012 - [email protected]
+
+- mount.cifs: initialize oldfsgid to surpress a warning while building for
+  RHEL 4 or CentOS 5.
+
+-------------------------------------------------------------------
+Tue Jun 12 11:54:14 UTC 2012 - [email protected]
+
+- mount.cifs: set rc to 0 in libcap toggle_dac_capability
+
+-------------------------------------------------------------------
+Fri Jun  1 18:30:07 UTC 2012 - [email protected]
+
+- BuildRequire libwbclient-devel for CentOS, Fedora, and RHEL builds too.
+
+-------------------------------------------------------------------
+Fri Jun  1 11:26:13 UTC 2012 - [email protected]
+
+- Do not call autoreconf while build.
+
+-------------------------------------------------------------------
+Fri Jun  1 09:06:29 UTC 2012 - [email protected]
+
+- BuildIgnore libtalloc to prevent a package conflict on Fedora systems.
+
+-------------------------------------------------------------------
+Thu May 31 11:49:37 UTC 2012 - [email protected]
+
+- BuildRequire libtalloc-devel unconditionally.
+
+-------------------------------------------------------------------
+Wed May 30 11:09:43 UTC 2012 - [email protected]
+
+- Update to cifs-utils 5.5.
+  + mount.cifs: don't pass credentials= option to the kernel
+  + doc: update mailing list
+  + mount.cifs: don't send a mandatory ver= option to the kernel
+  + mount.cifs: remove smb2 multicall binary code
+  + doc: remove old XML sources for mount.cifs.8 and cifs.upcall.8
+  + mount.cifs: unused variables
+
+-------------------------------------------------------------------
+Wed May 16 16:29:18 UTC 2012 - [email protected]
+
+- BuildRequire libtalloc2-devel instead of libtalloc-devel for post 12.1
+  systems.
+
+-------------------------------------------------------------------
+Thu Apr 19 22:23:56 UTC 2012 - [email protected]
+
+- Don't package get-, setcifsacl, and cifs.idmap for Mandriva pre-201100.
+
+-------------------------------------------------------------------
+Thu Apr 19 19:36:19 UTC 2012 - [email protected]
+
+- Don't care at all what the real uid is when we call toggle_dac_capability().
+
+-------------------------------------------------------------------
+Thu Apr 19 19:03:21 UTC 2012 - [email protected]
+
+- Make use of the stored return code in toggle_dac_capability() of mount.cifs.
+
+-------------------------------------------------------------------
+Thu Apr 19 17:29:11 UTC 2012 - [email protected]
+
+- Declare krb5_auth_con_set_req_cksumtype if the prototype does not exist.
+- Initialize bkupuid and bkupgid.
+
+-------------------------------------------------------------------
+Thu Apr 19 16:07:00 UTC 2012 - [email protected]
+
+- BuildRequire pkg-config for post-10.2 systems and else pkgconfig.
+
+-------------------------------------------------------------------
+Thu Apr 19 13:57:12 UTC 2012 - [email protected]
+
+- mount.cifs: fix up some -D_FORTIFY_SOURCE=2 warnings
+
+-------------------------------------------------------------------
+Thu Apr 19 10:30:44 UTC 2012 - [email protected]
+
+- Update to cifs-utils 5.4.
+  + the "rootsbindir" can now be specified at configure time
+  + mount.cifs now supports the -s option by passing "sloppy" to the
+    kernel in the options string
+  + cifs.upcall now properly respects the domain_realm section in krb5.conf
+  + unprivileged users can no longer mount onto dirs into which they
+    can't chdir (fixes CVE-2012-1586)
+
+-------------------------------------------------------------------
+Mon Feb  6 09:17:17 UTC 2012 - [email protected]
+
+- Added position independent flags to compilation and linking (-fpie/-pie);
+  (bnc#743133).
+
+-------------------------------------------------------------------
+Thu Feb  2 11:56:04 UTC 2012 - [email protected]
+
+- BuildRequire autoconf to avoid implicit dependency for post-11.4 systems.
+- BuildRequire keyutils-devel for post-10.2 systems.
+- BuildRequire libcap-ng-devel for post-11.2 systems.
+- BuildRequire libwbclient-devel for post-10.2 systems.
+- BuildRequire samba-winbind-devel for CentOS, Fedora, and RHEL systems.
+- Add getcifsacl, setcifsacl, cifs.idmap, and cifs.upcall binaries and man
+  pages to the filelist.
+
+-------------------------------------------------------------------
+Wed Feb  1 20:38:17 UTC 2012 - [email protected]
+
+- Update to cifs-utils 5.3.
+  + admins can now tell cifs.upcall to use an alternate krb5.conf file
+  + on remount, mount.cifs no longer adds a duplicate mtab entry
+  + the cifscreds utility has seen a major overhaul to allow for multiuser
+    mounts without krb5 auth
+
+- Update to cifs-utils 5.2.
+  + cifs.idmap can now map uid/gid to SID in addition to the other way around
+  + getcifsacl/setcifsacl are now installed by default in /usr/bin instead of
+    /usr/sbin. The manpages are now in section 1.
+  + cifs.upcall has a new scheme for picking the SPN on krb5 mounts. The
+    hostname is now always lowercased. If we fail to get a ticket using an
+    unqualified name, it now attempts to guess the domain name.
+  + A lot of manpage updates, additions and corrections
+
+- Update to cifs-utils 5.1.
+  + fix for a minor security issue that can corrupt the mtab
+  + new getcifsacl/setcifsacl tools that allow you to fetch and set raw
+    Windows ACLs via an xattr.
+  + a lot of manpage patches
+
+- Update to cifs-utils 5.0.
+  + mount.cifs always uses the original device string to ensure that umounts
+    by unprivileged users are not problematic
+  + there is a new cifs.idmap program for handling idmapping upcalls
+  + a lot of manpage patches
+
+-------------------------------------------------------------------
+Wed Dec 21 10:31:38 UTC 2011 - [email protected]
+
+- remove call to suse_update_config (very old work around)
+
+-------------------------------------------------------------------
+Thu Dec  1 16:04:20 UTC 2011 - [email protected]
+
++++ 6010 more lines (skipped)
++++ between /dev/null
++++ and /work/SRC/openSUSE:12.3:Update/.cifs-utils.1708.new/cifs-utils.changes

New:
----
  1a01f7c4b90695211d12291d7a24bec05b1f2922.diff
  cifs-utils-5.9.tar.bz2
  cifs-utils.changes
  cifs-utils.spec
  cifs.init
  cifstab
  mkinitrd_scripts_boot-cifs.sh
  mkinitrd_scripts_setup-cifs.sh

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ cifs-utils.spec ++++++
#
# spec file for package cifs-utils
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           cifs-utils
Version:        5.9
Release:        0
Summary:        Utilities for doing and managing mounts of the Linux CIFS 
filesyste
License:        GPL-3.0+
Group:          System/Filesystems
Url:            http://www.samba.org/linux-cifs/cifs-utils/
Source:         
ftp://ftp.samba.org/pub/linux-cifs/%{name}/%{name}-%{version}.tar.bz2
%if "%{_vendor}" == "suse"
%define  NET_CFGDIR network
%else
%define  NET_CFGDIR network-scripts
%endif
Source1:        cifs.init
Source2:        mkinitrd_scripts_boot-cifs.sh
Source3:        mkinitrd_scripts_setup-cifs.sh
Source4:        cifstab
Patch:          1a01f7c4b90695211d12291d7a24bec05b1f2922.diff
%if 0%{?suse_version}
PreReq:         insserv %{?fillup_prereq} mkinitrd
%else
PreReq:         /sbin/chkconfig
%endif
%define         initdir %{_sysconfdir}/init.d
Provides:       cifs-mount = %{version}
Obsoletes:      cifs-mount < %{version}
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1140
BuildRequires:  autoconf
%endif
BuildRequires:  automake
%if 0%{?suse_version} > 1020
BuildRequires:  keyutils-devel
%endif
BuildRequires:  krb5-devel
%if 0%{?suse_version} > 1120
BuildRequires:  libcap-ng-devel
%else
BuildRequires:  libcap-devel
%endif
#!BuildIgnore:  libtalloc
BuildRequires:  libtalloc-devel
%if 0%{?suse_version} > 1110
BuildRequires:  fdupes
%endif
%if 0%{?mandriva_version}
BuildRequires:  libkeyutils-devel
%endif
%if 0%{?centos_version} > 599 || 0%{?fedora_version} > 14 || 0%{?rhel_version} 
> 599 || 0%{?suse_version} > 1020
BuildRequires:  libwbclient-devel
%endif
%if 0%{?suse_version} > 1020
BuildRequires:  pkg-config
%else
BuildRequires:  pkgconfig
%endif
Requires:       keyutils
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
The cifs-utils package consist of utilities for doing and managing mounts of
the Linux CIFS filesystem.

%package devel
Summary:        Files needed for building plugins for cifs-utils
Group:          Development/Libraries

%description devel
The SMB/CIFS protocol is a standard file sharing protocol widely deployed
on Microsoft Windows machines. This package contains the header file
necessary for building ID mapping plugins for cifs-utils.

%prep
%setup -q
%patch -p1

%build
export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fpie"
export LDFLAGS="-pie"
%{configure}
%{__make} %{?_smp_mflags}

%install
mkdir -p \
        ${RPM_BUILD_ROOT}/%{_sysconfdir}/init.d
%{__make} install \
        DESTDIR=${RPM_BUILD_ROOT}
%if 0%{?centos_version} > 599 || 0%{?fedora_version} > 14 || 
0%{?mandriva_version} > 201100 || 0%{?rhel_version} > 599 || 0%{?suse_version} 
> 1020
mkdir -p %{buildroot}%{_sysconfdir}/%{name}
ln -s %{_libdir}/%{name}/idmapwb.so 
%{buildroot}%{_sysconfdir}/%{name}/idmap-plugin
%endif
mkdir -p %{buildroot}%{_sysconfdir}/request-key.d
install -m 644 -p contrib/request-key.d/cifs.idmap.conf 
%{buildroot}%{_sysconfdir}/request-key.d
install -m 644 -p contrib/request-key.d/cifs.spnego.conf 
%{buildroot}%{_sysconfdir}/request-key.d
%if 0%{?suse_version} > 1100
        mkdir -p ${RPM_BUILD_ROOT}/lib/mkinitrd/scripts/
        %{__install} -m 0755 ${RPM_SOURCE_DIR}/mkinitrd_scripts_boot-cifs.sh 
${RPM_BUILD_ROOT}/lib/mkinitrd/scripts/boot-cifs.sh
        %{__install} -m 0755 ${RPM_SOURCE_DIR}/mkinitrd_scripts_setup-cifs.sh 
${RPM_BUILD_ROOT}/lib/mkinitrd/scripts/setup-cifs.sh
%endif
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1221
mkdir -p \
        ${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-{down,up}.d 
\
        ${RPM_BUILD_ROOT}/%{_sysconfdir}/samba \
        ${RPM_BUILD_ROOT}/%{_sbindir} \
        ${RPM_BUILD_ROOT}/var/run
install -m 0755 -p ${RPM_SOURCE_DIR}/cifs.init 
${RPM_BUILD_ROOT}/%{_sysconfdir}/init.d/cifs
install -m 0600 -p ${RPM_SOURCE_DIR}/cifstab 
${RPM_BUILD_ROOT}/%{_sysconfdir}/samba/cifstab
ln -s %{_sysconfdir}/init.d/${cifs_init_script} 
${RPM_BUILD_ROOT}/%{_sbindir}/rccifs
touch 
${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-{down,up}.d/${script}
 \
        ${RPM_BUILD_ROOT}/var/run/cifs
%endif
# Hardlink duplicate files
%if 0%{?suse_version} > 1110
%fdupes ${RPM_BUILD_ROOT}
%endif

%pre
# non SUSE + post-12.2, update, no cifstab, but smbfstab
if [ ! 0%{?suse_version} -lt 1221 -a \
        ${1:-0} -gt 1 -a \
        ! -e /etc/samba/cifstab -a \
        -f /etc/samba/smbfstab ]; then
        cp -a /etc/samba/smbfstab /var/adm/backup/etc_samba_smbfstab-move
        chkconfig -c smbfs && >/var/adm/backup/etc_samba_smbfs-enabled || :
fi

%post
if [ ${1:-0} -gt 1 -a -f /var/adm/backup/etc_samba_smbfstab-move ]; then
        test -f /etc/samba/cifstab && \
                mv /etc/samba/cifstab /etc/samba/cifstab.rpmnew
        mv /var/adm/backup/etc_samba_smbfstab-move /etc/samba/cifstab
        if [ -f /var/adm/backup/etc_samba_smbfs-enabled ]; then
                chkconfig -a cifs >/dev/null
                rm /var/adm/backup/etc_samba_smbfs-enabled
        fi
fi
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
exit 0

%postun
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
exit 0

%files
%defattr(-,root,root)
/sbin/mount.cifs
%if 0%{?centos_version} > 599 || 0%{?fedora_version} > 14 || 
0%{?mandriva_version} > 201100 || 0%{?rhel_version} > 599 || 0%{?suse_version} 
> 1020
%{_bindir}/getcifsacl
%{_bindir}/setcifsacl
%{_sbindir}/cifs.idmap
%doc %{_mandir}/man1/getcifsacl.1.*
%doc %{_mandir}/man1/setcifsacl.1.*
%doc %{_mandir}/man8/cifs.idmap.8.*
%endif
%if 0%{?centos_version} > 499 || 0%{?fedora_version} > 14 || 
0%{?mandriva_version} > 201100 || 0%{?rhel_version} > 499 || 0%{?suse_version} 
> 1020
%{_bindir}/cifscreds
%{_sbindir}/cifs.upcall
%doc %{_mandir}/man1/cifscreds.1.*
%doc %{_mandir}/man8/cifs.upcall.8.*
%endif
%doc %{_mandir}/man8/mount.cifs.8.*
%dir %{_sysconfdir}/request-key.d
%if 0%{?suse_version} > 1100
%dir /lib/mkinitrd
%dir /lib/mkinitrd/scripts
/lib/mkinitrd/scripts/setup-cifs.sh
/lib/mkinitrd/scripts/boot-cifs.sh
%endif
%config(noreplace) %{_sysconfdir}/request-key.d/cifs.idmap.conf
%config(noreplace) %{_sysconfdir}/request-key.d/cifs.spnego.conf
%if 0%{?centos_version} > 599 || 0%{?fedora_version} > 14 || 
0%{?mandriva_version} > 201100 || 0%{?rhel_version} > 599 || 0%{?suse_version} 
> 1020
%dir %{_libdir}/cifs-utils
%dir %{_sysconfdir}/cifs-utils
%config(noreplace) %{_sysconfdir}/cifs-utils/idmap-plugin
%{_libdir}/%{name}/idmapwb.so
%doc %{_mandir}/man8/idmapwb.8.*
%endif
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1221
%attr(0754,root,root) %config %{_sysconfdir}/init.d/cifs
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/samba/cifstab
%{_sbindir}/rccifs
%dir %{_sysconfdir}/samba
%ghost %{_localstatedir}/run/cifs
%endif

%files devel
%defattr(-,root,root)
%{_includedir}/cifsidmap.h

%changelog
++++++ 1a01f7c4b90695211d12291d7a24bec05b1f2922.diff ++++++
commit 1a01f7c4b90695211d12291d7a24bec05b1f2922
Author: Jeff Layton <[email protected]>
Date:   Sat Jan 12 22:02:01 2013 -0500

    mount.cifs: set parsed_info->got_user when a cred file supplies a username
    
    commit 85d18a1ed introduced a regression when using a credentials file.
    It set the username in the parsed mount info properly, but didn't set
    the "got_user" flag in it.
    
    Also, fix an incorrect strlcpy length specifier in open_cred_file.
    
    Reported-by: "Mantas M." <[email protected]>
    Signed-off-by: Jeff Layton <[email protected]>

diff --git a/mount.cifs.c b/mount.cifs.c
index c7c3055..40b77e9 100644
--- a/mount.cifs.c
+++ b/mount.cifs.c
@@ -581,7 +581,8 @@ static int open_cred_file(char *file_name,
                switch (parse_cred_line(line_buf + i, &temp_val)) {
                case CRED_USER:
                        strlcpy(parsed_info->username, temp_val,
-                               sizeof(parsed_info->domain));
+                               sizeof(parsed_info->username));
+                       parsed_info->got_user = 1;
                        break;
                case CRED_PASS:
                        i = set_password(parsed_info, temp_val);
++++++ cifs.init ++++++
#! /bin/sh
# Copyright (c) 1999-2009 SuSE Linux AG, Nuernberg, Germany.
# All rights reserved.
#
# Author: Thomas Fehr, 1999-2001
#         Lars Mueller <[email protected]>, 2002-2009
#         Bjoern Jacke <[email protected]> 2004
#
# /etc/init.d/cifs
#   and its symbolic link
# /usr/sbin/rccifs
#
#       This program is free software: you can redistribute it and/or modify
#       it under the terms of the GNU General Public License as published by
#       the Free Software Foundation, either version 3 of the License, or
#       (at your option) any later version.
#
#       This program is distributed in the hope that it will be useful,
#       but WITHOUT ANY WARRANTY; without even the implied warranty of
#       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#       GNU General Public License for more details.
#
#       You should have received a copy of the GNU General Public License
#       along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
### BEGIN INIT INFO
# Provides:       cifs
# Required-Start: $network $syslog
# Should-Start:   nfs nmb
# Required-Stop:  $network $syslog
# Should-Stop:    nfs nmb
# Default-Start:  3 5
# Default-Stop:   0 1 2 6
# Short-Description: Import remote SMB/ CIFS (MS Windows) file systems
# Description:    Import remote SMB/ CIFS (MS Windows) file systems
### END INIT INFO

# To access SMB/ CIFS servers beyond the network broadcast domain it may be
# necessary to also activate the nmb service. Also see section 'cifs and nmb
# service' in /usr/share/doc/packages/samba/README.SUSE

. /etc/rc.status
rc_reset

LC_ALL=en_US
CIFSTAB="/etc/samba/cifstab"
SMB_CONF="/etc/samba/smb.conf"
CIFS_STATE_FILE="/var/run/cifs"
SLEEP=1
TIMEOUT=10

grep -q " cifs " /proc/mounts
test $? -eq 0 && cifs_used=yes || cifs_used=no

case "$1" in
        start)
                grep -q '^[[:space:]]*[^#].*[[:space:]]cifs[[:space:]]' 
/etc/fstab
                rc=$?
                if [ ! -f ${CIFSTAB} -a ${rc} -ne 0 ]; then
                        echo -n >&2 "No ${CIFSTAB} found and no type cifs 
active in /etc/fstab. "
                        rc_status -s
                        exit 6
                fi
                echo -n "Mount CIFS File Systems "
                service_used="no"
                if [ ${rc} -eq 0 ]; then
                        service_used="yes"
                        timer=${TIMEOUT}
                        JOBS="none"
                        printdot=""
                        while [ "${JOBS}" ] && [ ${timer} -gt 0 ]; do
                                if [ -z "${printdot}" ]; then
                                        echo
                                        echo -n "from /etc/fstab "
                                        mount -at cifs >/dev/null &
                                        PID=$!
                                fi
                                test -e /proc/$PID || JOBS=""
                                if [ "${JOBS}" ]; then
                                        timer=$[${timer}-1]
                                        echo -n "."
                                        sleep ${SLEEP}
                                        printdot="yes"
                                fi
                        done
                        test "${printdot}" && echo -n " "
                        if [ "${JOBS}" -a ${timer} -eq 0 ]; then
                                echo -n >&2 " Error: timeout while mount. "
                                rc_failed
                        fi
                        rc_status -v
                fi
                timer=-1
                test -e ${CIFSTAB} && \
                while read service mountpoint vfstype options; do
                        case "${service}" in
                                ""|\#*|\;*) continue ;;
                        esac
                        # Set default vfstype which is also a hack for old
                        # cifstab formated files without a vfstype set.
                        if [ "${vfstype}" != "cifs" -a -z "${options}" ]; then
                                options="${vfstype}"
                                vfstype="cifs"
                        fi
                        # If no options are set use an empty password.
                        if [ -z "${options}" ]; then
                                options="password="
                        fi
                        if [ ${timer} -eq -1 ]; then
                                echo -en "from ${CIFSTAB} \n"
                                timer=0
                        fi
                        # Remove /s at the end of a mount point.
                        mountpoint=$( echo "$mountpoint"|sed "s/\/*$//")
                        if grep -q "[[:space:]]$mountpoint[[:space:]]" 
/proc/mounts; then
                                echo -n "$mountpoint: mount point already in 
use. "
                                rc_status -s
                                continue
                        fi
                        service_used="yes"
                        echo -n "${service} on ${mountpoint} type ${vfstype} "
                        rc_reset
                        timer=${TIMEOUT}
                        JOBS="none"
                        printdot=""
                        while [ "${JOBS}" ] && [ ${timer} -gt 0 ]; do
                                if [ -z "${printdot}" ]; then
                                        mount -t "${vfstype}" -o ${options} 
"${service}" "${mountpoint}" >/dev/null &
                                        PID=$!
                                fi
                                test -e /proc/$PID || JOBS=""
                                if [ "${JOBS}" ]; then
                                        timer=$[${timer}-1]
                                        echo -n "."
                                        sleep ${SLEEP}
                                        printdot="yes"
                                fi
                        done
                        test "${printdot}" && echo -n " "
                        if [ "${JOBS}" -a ${timer} -eq 0 ]; then
                                echo -n >&2 " Error: timeout while mount. "
                                rc_failed
                        fi
                        rc_status -v
                done < ${CIFSTAB}
                test "${service_used}" = "no" && rc_status -u
                touch ${CIFS_STATE_FILE}
                ;;
        stop)
                echo -n "Umount CIFS File Systems "
                if [ "${cifs_used}" = "yes" ]; then
                        #
                        # Unmount in background due to possible long timeouts
                        #
                        timer=${TIMEOUT}
                        JOBS="none"
                        printdot=""
                        while [ "${JOBS}" ] && [ ${timer} -gt 0 ]; do
                                if [ -z "${printdot}" ]; then
                                        umount -at cifs &
                                        PID=$!
                                fi
                                test -e /proc/$PID || JOBS=""
                                if [ "${JOBS}" ]; then
                                        timer=$[${timer}-1]
                                        echo -n "."
                                        sleep ${SLEEP}
                                        printdot="yes"
                                fi
                        done
                        test "${printdot}" && echo -n " "
                        if [ "${JOBS}" -a ${timer} -eq 0 ]; then
                                echo -n >&2 " Error: timeout while umount. "
                                rc_failed
                        fi
                fi
                rc_status -v
                ;;
        try-restart|condrestart)
                if test "$1" = "condrestart"; then
                        echo "${attn} Use try-restart ${done}(LSB)${attn} 
rather than condrestart ${warn}(RH)${norm}"
                fi
                $0 status
                if test $? = 0; then
                        $0 restart
                else 
                        rc_reset
                fi
                rc_status
                ;;
        force-reload|restart)
                $0 stop
                $0 start
                rc_status
                ;;
        reload)
                echo -n "Reload mounted CIFS File Systems "
                rc_failed 3
                rc_status -v
                ;;
        status)
                echo -n "Checking for mounted CIFS File Systems "
                if [ "${cifs_used}" = "yes" ]; then
                        mount -t cifs | while read service on mountpoint type 
vfstype rest; do
                                echo
                                echo -n "${service} on ${mountpoint} type 
${vfstype} "
                        done
                else
                        rc_failed 3
                fi
                rc_status -v
                ;;
        probe)
                test ${CIFSTAB} -nt ${CIFS_STATE_FILE} -o \
                        ${SMB_CONF} -nt ${CIFS_STATE_FILE} && echo restart
                ;;
        *)
                echo "Usage: $0 
{start|stop|status|force-reload|reload|restart|reload|probe}"
                exit 1
                ;;
esac
rc_exit
++++++ cifstab ++++++
# This file allows you to mount SMB/ CIFS shares during system boot while
# hiding passwords to other people than root.  Use /etc/fstab for public
# available services.  You have to specify at least a service name and a mount
# point.  Current default vfstype is cifs.
#
# The options are explained in the manual page of mount.cifs.
#
# service       moint-point     vfstype options

;//fjall/test    /data/test      cifs    username=tridge,password=foobar
++++++ mkinitrd_scripts_boot-cifs.sh ++++++
#!/bin/bash
#%stage: block
#%modules: cifs
#%programs: /sbin/mount.cifs
#%if: "$rootfstype" = "cifs"
#
##### CIFS support
##
## This is where CIFS gets mounted.
##
## Command line parameters
## -----------------------
##
## root=cifs://[user:pass@]<server>/<folder>    the cifs root path
## cifsuser=<username> (only used if not defined in root=)
## cifspass=<password> (only used if not defined in root=)
## 

if [ "$rootfstype" = "cifs" ]; then
        # load the cifs module before using it
        load_modules
        
        if [ "${rootdev%%://*}" = "cifs" ]; then # URL parsing
                rootdev=${rootdev##cifs://}
                username=${rootdev%@*}
                password=${username#*:}
                if [ "$password" ]; then
                        cifspass=$password
                        username=${username%:*}
                fi
                cifsuser=$username
                if [ "$username" ]; then
                        rootdev="${rootdev#*@}"
                fi
                rootdev="//$rootdev"
        fi

        rootfsmod=
        if [ ! "$cifsuser" -o ! "$cifspass" ]; then
                echo "For CIFS support you need to specify a username and 
password either in the cifsuser and cifspass commandline parameters or in the 
root= CIFS URL."
        fi
        if [ "$rootflags" ] ; then
            rootflags="${rootflags},user=$cifsuser"
        else
            rootflags="user=$cifsuser"
        fi
        rootflags="$rootflags,pass=$cifspass"
else
        dont_load_modules
fi
++++++ mkinitrd_scripts_setup-cifs.sh ++++++
#!/bin/bash
#
#%stage: device
#

if [ "$rootfstype" = "cifs" ]; then
    interface=default
    save_var rootfstype
fi
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to