#include <linux/smb_fs.h>
extern bool in_client;
-extern pstring user_socket_options;
extern char *optarg;
extern int optind;
} else if(!strcmp(opts, "workgroup")) {
pstrcpy(workgroup,opteq+1);
} else if(!strcmp(opts, "sockopt")) {
- pstrcpy(user_socket_options,opteq+1);
+ lp_do_parameter(-1, "socket options", opteq+1);
} else if(!strcmp(opts, "scope")) {
set_global_scope(opteq+1);
} else {
* -i,--scope
*/
-extern pstring user_socket_options;
extern bool AllowDebugChange;
extern bool override_logfile;
case 'O':
if (arg) {
- pstrcpy(user_socket_options,arg);
+ lp_do_parameter(-1, "socket options", arg);
}
break;
int trans_num = 0;
static enum remote_arch_types ra_type = RA_UNKNOWN;
-pstring user_socket_options=DEFAULT_SOCKET_OPTIONS;
/***********************************************************************
Definitions for all names.
#include "includes.h"
-extern pstring user_socket_options;
-
static const struct {
int prot;
const char *name;
DEBUG(3,("Retargeted\n"));
- set_socket_options(cli->fd,user_socket_options);
+ set_socket_options(cli->fd, lp_socket_options());
/* Try again */
{
return map_nt_error_from_unix(errno);
}
- set_socket_options(cli->fd,user_socket_options);
+ set_socket_options(cli->fd, lp_socket_options());
return NT_STATUS_OK;
}
bool in_client = False; /* Not in the client by default */
bool bLoaded = False;
-extern pstring user_socket_options;
extern enum protocol_types Protocol;
extern userdom_struct current_user_info;
{"max open files", P_INTEGER, P_GLOBAL, &Globals.max_open_files, NULL, NULL, FLAG_ADVANCED},
{"min print space", P_INTEGER, P_LOCAL, &sDefault.iMinPrintSpace, NULL, NULL, FLAG_ADVANCED | FLAG_PRINT},
- {"socket options", P_GSTRING, P_GLOBAL, user_socket_options, NULL, NULL, FLAG_ADVANCED},
+ {"socket options", P_STRING, P_GLOBAL, &Globals.szSocketOptions, NULL, NULL, FLAG_ADVANCED},
{"strict allocate", P_BOOL, P_LOCAL, &sDefault.bStrictAllocate, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE},
{"strict sync", P_BOOL, P_LOCAL, &sDefault.bStrictSync, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE},
{"sync always", P_BOOL, P_LOCAL, &sDefault.bSyncAlways, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE},
string_set(&Globals.szPanicAction, "/bin/sleep 999999999");
#endif
- pstrcpy(user_socket_options, DEFAULT_SOCKET_OPTIONS);
+ string_set(&Globals.szSocketOptions, DEFAULT_SOCKET_OPTIONS);
string_set(&Globals.szLogonDrive, "");
/* %N is the NIS auto.home server if -DAUTOHOME is used, else same as %L */
FN_GLOBAL_INTEGER(lp_oplock_break_wait_time, &Globals.oplock_break_wait_time)
FN_GLOBAL_INTEGER(lp_lock_spin_time, &Globals.iLockSpinTime)
FN_GLOBAL_INTEGER(lp_usershare_max_shares, &Globals.iUsershareMaxShares)
+FN_GLOBAL_CONST_STRING(lp_socket_options, &Globals.szSocketOptions)
FN_LOCAL_STRING(lp_preexec, szPreExec)
FN_LOCAL_STRING(lp_postexec, szPostExec)
#define LAST_MESSAGE() smb_fn_name(last_message)
extern struct auth_context *negprot_global_auth_context;
-extern pstring user_socket_options;
extern SIG_ATOMIC_T got_sig_term;
extern SIG_ATOMIC_T reload_after_sighup;
static SIG_ATOMIC_T got_sig_cld;
close_low_fds(False); /* Don't close stderr */
set_socket_options(smbd_server_fd(),"SO_KEEPALIVE");
- set_socket_options(smbd_server_fd(), user_socket_options);
+ set_socket_options(smbd_server_fd(), lp_socket_options());
return True;
}
/* ready to listen */
set_socket_options(s,"SO_KEEPALIVE");
- set_socket_options(s,user_socket_options);
+ set_socket_options(smbd_server_fd(),
+ lp_socket_options());
/* Set server socket to
* non-blocking for the accept. */
/* ready to listen */
set_socket_options(s,"SO_KEEPALIVE");
- set_socket_options(s,user_socket_options);
+ set_socket_options(smbd_server_fd(),
+ lp_socket_options());
/* Set server socket to non-blocking
* for the accept. */
am_parent = 0;
set_socket_options(smbd_server_fd(),"SO_KEEPALIVE");
- set_socket_options(smbd_server_fd(),user_socket_options);
+ set_socket_options(smbd_server_fd(),
+ lp_socket_options());
/* this is needed so that we get decent entries
in smbstatus for port 445 connects */
if (smbd_server_fd() != -1) {
set_socket_options(smbd_server_fd(),"SO_KEEPALIVE");
- set_socket_options(smbd_server_fd(), user_socket_options);
+ set_socket_options(smbd_server_fd(), lp_socket_options());
}
mangle_reset_cache();
extern pstring global_myname;
-extern pstring user_socket_options;
-
-
extern file_info def_finfo;
#define CNV_LANG(s) dos2unix_format(s,False)
case 'O':
{
- pstrcpy(user_socket_options,optarg);
+ lp_do_parameter(-1, "socket options", optarg);
break;
}
struct cmd_set *cmd_set;
} *cmd_list;
-extern pstring user_socket_options;
-
int get_client_fd(void)
{
return -1;
{
if (smbd_server_fd() != -1) {
set_socket_options(smbd_server_fd(),"SO_KEEPALIVE");
- set_socket_options(smbd_server_fd(), user_socket_options);
+ set_socket_options(smbd_server_fd(),
+ lp_socket_options());
}
}