return service ? lpcfg_string((const char *)service->szService) : NULL;
}
-/**
- * A useful volume label function.
- */
-const char *lpcfg_volume_label(struct loadparm_service *service, struct loadparm_service *sDefault)
-{
- const char *ret;
- ret = lpcfg_string((const char *)((service != NULL && service->volume != NULL) ?
- service->volume : sDefault->volume));
- if (!*ret)
- return lpcfg_servicename(service);
- return ret;
-}
struct smb_iconv_handle *lpcfg_iconv_handle(struct loadparm_context *lp_ctx)
{
if (lp_ctx == NULL) {
struct loadparm_service *lpcfg_service(struct loadparm_context *lp_ctx,
const char *service_name);
-/**
- * A useful volume label function.
- */
-const char *lp_cfg_volume_label(struct loadparm_service *service, struct loadparm_service *sDefault);
struct smb_iconv_handle *lpcfg_iconv_handle(struct loadparm_context *lp_ctx);
void lpcfg_smbcli_options(struct loadparm_context *lp_ctx,
struct smbcli_options *options);
#define SHARE_HOSTS_DENY "hosts-deny"
#define SHARE_NTVFS_HANDLER "ntvfs-handler"
#define SHARE_TYPE "type"
-#define SHARE_VOLUME "volume"
#define SHARE_CSC_POLICY "csc-policy"
#define SHARE_AVAILABLE "available"
#define SHARE_BROWSEABLE "browseable"
return lpcfg_comment(s, lpcfg_default_service(lp_ctx), mem_ctx);
}
- if (strcmp(opt_name, SHARE_VOLUME) == 0) {
- return talloc_strdup(mem_ctx, lpcfg_volume_label(s, lpcfg_default_service(lp_ctx)));
- }
-
if (strcmp(opt_name, SHARE_TYPE) == 0) {
if (lpcfg_printable(s, lpcfg_default_service(lp_ctx))) {
return talloc_strdup(mem_ctx, "PRINTER");