summaryrefslogtreecommitdiffstats
path: root/extras/hook-scripts/set/post/S30samba-set.sh
Commit message (Collapse)AuthorAgeFilesLines
* extras/hooks: Remove smb.conf parameter allowing guest accessAnoop C S2019-12-101-1/+0
| | | | | | Change-Id: I88f494f16153d27ab6e2f2faf4d557e075671b10 Fixes: bz#1775612 Signed-off-by: Anoop C S <anoopcs@redhat.com>
* gluster-smb:add smb parameter when access gluster by cifsyinkui2019-08-211-0/+1
| | | | | | Change-Id: I9ff54f2ca6f86bb5b2f4740485a0159e1fd7785f Fixes: bz#1741734 Signed-off-by: yinkui <13965432176@163.com>
* Do not blindly add volume share section to smb.confMilan Zink2018-12-041-2/+11
| | | | | | | | | | | | | With this change, by default GlusterFS volume share section will no longer be added to smb.conf for client access unless user.cifs or user.smb volume set options are enabled. This also fixes the hook script to check for presence of all configuration possibilities for those volume set options like 'enable' or 'on'. Change-Id: Ibecf7fffb4507d7255d963c3b1482afb0d0db984 Signed-off-by: Milan Zink <mzink@redhat.com> Signed-off-by: Anoop C S <anoopcs@redhat.com> Fixes: bz#1575836
* extras/hooks: Do not blindly remove volume share from smb.confAnoop C S2018-05-071-5/+6
| | | | | | | | | | | | | | | | | When Gluster volumes are shared via Samba, any extra smb.conf parameter setting done by administrator to those shares are lost during restart of the volume. Instead of removing the whole share completely from smb.conf(via hook scripts during volume stop) it is better to make it temporarily unavailable to end-users till the volume is started again. Therefore we make use of a smb.conf parameter named 'available'[1] to achieve the above intend. [1] https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html Change-Id: I68a9055b50791f6ffd3b95a3c13d858a75fa6530 fixes: bz#1558921 BUG: 1558921 Signed-off-by: Anoop C S <anoopcs@redhat.com>
* extras/hooks: Fix getopt usageAnoop C S2017-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | `getopt` does not have an optional argument as '-name'. It should be either '-n' or '--name'(see man getopt(1)). This wrong usage resulted in setting the script name as 'ame' instead of $PROGNAME in most of the hook-scripts. Additionally the following line from DESCRIPTION given for `getopt` shell command expects short options for almost every kind of usage mentioned in SYNOPSIS: . . . If no '-o' or '--options' option is found in the first part, the first parameter of the second part is used as the short options string. . . . Refer http://man7.org/linux/man-pages/man1/getopt.1.html for more clarity on its usage. Change-Id: I95baf5fa8c99025e66b2d83656dd838d4f6048ce BUG: 1503983 Signed-off-by: Anoop C S <anoopcs@redhat.com>
* extras/hooks: Fix errors reported via shellcheck utilityAnoop C S2017-10-181-6/+6
| | | | | | Change-Id: I217c6b2a39955f1709bb3452b00d33c2dcb60faa BUG: 1500649 Signed-off-by: Anoop C S <anoopcs@redhat.com>
* hook-scripts: fix S30Samba scripts on systemd systemsMichael Adam2015-12-171-1/+1
| | | | | | | | | | | | | | | | /etc/init.d/smb does not exist on systemd systems. Using "service smb <COMMAND>" is the portable way. It calls init scripts on sysv systems, and redirects to systemctl on systemd systems. Change-Id: I7146c9998a51d8b170d3321f3477e92704ae7615 BUG: 1290604 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-on: http://review.gluster.org/12945 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anoop C S <anoopcs@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* extras/hooks: Fix parsing of args in S30samba-set.shRaghavendra Talur2015-11-161-5/+9
| | | | | | | | | Change-Id: I75756f44757a144b0ed229fcc0e29a273fc75886 BUG: 1242892 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/11668 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* extras/hookscripts: Fix set behaviour for user.cifs and user.smbRaghavendra Talur2014-11-111-12/+28
| | | | | | | | | | | | | | | Setting either of user.cifs or user.smb to disable should disable smb shares when the smb share is already available. Change-Id: I213ffca9cedc14107daeb30271d1f41dd9d7fcf4 BUG: 1105147 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/9042 Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jose A. Rivera <jarrpa@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* Hook scripts should exit with correct exit status.Meghana Madhusudhan2014-08-311-2/+3
| | | | | | | | | | | | | | | | | | When volume set options other than nfs-ganesha.host and nfs-ganesha.enable are executed, the hook script S31ganesha-set.sh should exit with exit status 0. The present behaviour results in an error message in one of the logs that could be misleading. Similarly, hook script S30samba-set.sh should exit with exit status 0 if samba is not installed. Fixing the issue with a minor change in the script. Change-Id: I35d1dc8400bb7043385800ed97adc5321829437f BUG: 1122978 Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/8385 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* build: make GLUSTERD_WORKDIR rely on localstatedirHarshavardhana2014-08-071-19/+23
| | | | | | | | | | | | | | | | | | | | | | - Break-way from '/var/lib/glusterd' hard-coded previously, instead rely on 'configure' value from 'localstatedir' - Provide 's/lib/db' as default working directory for gluster management daemon for BSD and Darwin based installations - loff_t is really off_t on Darwin - fix-off the warnings generated by clang on FreeBSD/Darwin - Now 'tests/*' use GLUSTERD_WORKDIR a common variable for all platforms. - Define proper environment for running tests, define correct PATH and LD_LIBRARY_PATH when running tests, so that the desired version of glusterfs is used, regardless where it is installed. (Thanks to manu@netbsd.org for this additional work) Change-Id: I2339a0d9275de5939ccad3e52b535598064a35e7 BUG: 1111774 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/8246 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* extras/hookscripts: When set option disables smb, don't start smb.Raghavendra Talur2014-06-121-1/+1
| | | | | | | | | | | | | | When user.smb or user.cifs option is set to disable, we remove the share options from smb.conf. If smb process is running, a sighup is required but we should not start the process if its not running. Change-Id: I1e2163ff209ba858380f7da459ff1dba3cf673f2 BUG: 1105123 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/7994 Reviewed-by: Poornima G <pgurusid@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* extras/hookscripts: Remove %P from smb share path value.Raghavendra Talur2014-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | We had added %P in the value for path in smb share definitions to avoid ctdb errors. However, %P does not work well for windows clients and they fail to access the share. Solution for the original problem: The error messages were being generated by a monitoring script that ctdb runs. The script reads the path value from testparm and tests if it exists in the local machine. This particular check does not hold valid for virtual file system backends like gluster. There is no harm in asking ctdb to not to check the existence of such backend and can be done by setting the following config in ctdb.conf: CTDB_SAMBA_SKIP_SHARE_CHECK=YES. Change-Id: I91627c8a279126a5cc24c6347847f9bfbad53dd5 BUG: 1068776 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/7598 Reviewed-by: Jose A. Rivera <jarrpa@redhat.com> Reviewed-by: Poornima G <pgurusid@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
* hook-scripts: Move smb hooks to right place.Raghavendra Talur2014-03-101-0/+126
Moved the hook-scripts to dirs corresponding to event. Also, edited S30samba-set.sh to with changes in other two hook scripts to bring uniformity. Change-Id: Ib98c0a18d4bb5d0ba4b881b2e19b40d72580b1c2 BUG: 1073468 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/7201 Reviewed-by: Poornima G <pgurusid@redhat.com> Reviewed-by: Bala FA <barumuga@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>