Currently only used in one place, but we'll need to use it to
temporarily change pathname processing to fix bug 12021.
This (hack) is only needed for 4.4.x and below, it is fixed
correctly in 4.5.x.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12021
Signed-off-by: Jeremy Allison <jra@samba.org>
void set_use_sendfile(int snum, bool val);
void lp_set_mangling_method(const char *new_method);
bool lp_posix_pathnames(void);
-void lp_set_posix_pathnames(void);
+bool lp_set_posix_pathnames(bool newval);
enum brl_flavour lp_posix_cifsu_locktype(files_struct *fsp);
void lp_set_posix_default_cifsx_readwrite_locktype(enum brl_flavour val);
int lp_min_receive_file_size(void);
}
/*******************************************************************
- Change everything needed to ensure POSIX pathname processing (currently
- not much).
+ Set posix pathnames to new value. Returns old value.
********************************************************************/
-void lp_set_posix_pathnames(void)
+bool lp_set_posix_pathnames(bool newval)
{
- posix_pathnames = true;
+ bool oldval = posix_pathnames;
+ posix_pathnames = newval;
+ return oldval;
}
/*******************************************************************
/* Here is where we must switch to posix pathname processing... */
if (xconn->smb1.unix_info.client_cap_low & CIFS_UNIX_POSIX_PATHNAMES_CAP) {
- lp_set_posix_pathnames();
+ (void)lp_set_posix_pathnames(true);
mangle_change_to_posix();
}