libcli/auth: add const to set_pw_in_buffer()
[Samba.git] / source3 / script / smbaddshare
blob62f1bdf4f17e6ce33f03b4677f56d613b84f2458
1 #!/bin/sh
3 # smbaddshare
5 # Copyright (C) 2015 Christof Schmitt
7 # Example script that can be used with the 'add share command' config
8 # option. This is mainly intended for use in the Samba selftest suite,
9 # please review and adapt it before using elsewhere.
12 CONF="$1"
13 SHARENAME="$2"
14 SHAREPATH="$3"
15 COMMENT="$4"
16 MAX_CONN="$5"
18 NETCONF="$BINDIR/net --configfile=$CONF conf"
20 $NETCONF addshare "$SHARENAME" "$SHAREPATH" writeable=no guest_ok=no "$COMMENT"
21 RC=$?
22 if [[ $RC -ne 0 ]]; then
23 echo Failure during addshare: rc=$RC
24 exit $RC
27 $NETCONF setparm "$SHARENAME" 'max connections' "$MAX_CONN"
28 RC=$?
29 if [[ $RC -ne 0 ]]; then
30 echo Failure during setparm for max connections: rc=$RC
31 exit $RC