make_printerdef.c: Fixed warning.
quotas.c: Fixed irix root errors.
server.c: Fixed oplock reference count bug.
smb.h: Added IS_VETO_OPLOCK_PATH().
Jeremy.
char *lp_mangled_map(int );
char *lp_veto_files(int );
char *lp_hide_files(int );
+char *lp_veto_oplocks(int );
char *lp_driverlocation(int );
BOOL lp_alternate_permissions(int );
BOOL lp_revalidate(int );
int num_files_open;
name_compare_entry *hide_list; /* Per-share list of files to return as hidden. */
name_compare_entry *veto_list; /* Per-share list of files to veto (never show). */
+ name_compare_entry *veto_oplock_list; /* Per-share list of files to refuse oplocks on. */
} connection_struct;
#define MAP_ARCHIVE(cnum) (OPEN_CNUM(cnum) && lp_map_archive(SNUM(cnum)))
#define IS_HIDDEN_PATH(cnum,path) (is_in_path((path),Connections[(cnum)].hide_list))
#define IS_VETO_PATH(cnum,path) (is_in_path((path),Connections[(cnum)].veto_list))
+#define IS_VETO_OPLOCK_PATH(cnum,path) (is_in_path((path),Connections[(cnum)].veto_oplock_list))
#define SMBENCRYPT() (lp_encrypted_passwords())
char *szMangledMap;
char *szVetoFiles;
char *szHideFiles;
+ char *szVetoOplockFiles;
char *comment;
char *force_user;
char *force_group;
NULL, /* szMangledMap */
NULL, /* szVetoFiles */
NULL, /* szHideFiles */
+ NULL, /* szVetoOplockFiles */
NULL, /* comment */
NULL, /* force user */
NULL, /* force group */
{"delete veto files",P_BOOL, P_LOCAL, &sDefault.bDeleteVetoFiles, NULL},
{"veto files", P_STRING, P_LOCAL, &sDefault.szVetoFiles, NULL},
{"hide files", P_STRING, P_LOCAL, &sDefault.szHideFiles, NULL},
+ {"veto oplock files",P_STRING, P_LOCAL, &sDefault.szVetoOplockFiles,NULL},
{"guest only", P_BOOL, P_LOCAL, &sDefault.bGuest_only, NULL},
{"only guest", P_BOOL, P_LOCAL, &sDefault.bGuest_only, NULL},
{"guest ok", P_BOOL, P_LOCAL, &sDefault.bGuest_ok, NULL},
FN_LOCAL_STRING(lp_mangled_map,szMangledMap)
FN_LOCAL_STRING(lp_veto_files,szVetoFiles)
FN_LOCAL_STRING(lp_hide_files,szHideFiles)
+FN_LOCAL_STRING(lp_veto_oplocks,szVetoFiles)
FN_LOCAL_STRING(lp_driverlocation,szPrinterDriverLocation)
FN_LOCAL_BOOL(lp_alternate_permissions,bAlternatePerm)
{
r=quotactl (Q_GETQUOTA, mnt->mnt_fsname, euser_id, (caddr_t) &D);
+ seteuid(euser_id); /* Restore the original uid status. */
+
if (r==-1)
return(False);
{
r=quotactl (Q_XGETQUOTA, mnt->mnt_fsname, euser_id, (caddr_t) &F);
+ seteuid(euser_id); /* Restore the original uid status. */
+
if (r==-1)
return(False);
}
else
+ {
+ seteuid(euser_id); /* Restore the original uid status. */
return(False);
+ }
return (True);
if (normal_close)
check_magic(fnum,cnum);
+ if(fs_p->granted_oplock == True)
+ global_oplocks_open--;
+
DEBUG(2,("%s %s closed file %s (numopen=%d)\n",
timestring(),Connections[cnum].user,fs_p->name,
Connections[cnum].num_files_open));
(access_allowed == AREAD && *flags == O_WRONLY) ||
(access_allowed == AWRITE && *flags == O_RDONLY))
{
- DEBUG(2,("Share violation on file (%d,%d,%d,%d,%s) = %d\n",
+ DEBUG(2,("Share violation on file (%d,%d,%d,%d,%s,fcbopen = %d, flags = %d) = %d\n",
deny_mode,old_deny_mode,old_open_mode,
- share->pid,fname, access_allowed));
+ share->pid,fname, fcbopen, *flags, access_allowed));
return False;
}
be extended to level II oplocks (multiple reader
oplocks). */
- if(oplock_request && (num_share_modes == 0) && lp_oplocks(SNUM(cnum)))
+ if(oplock_request && (num_share_modes == 0) && lp_oplocks(SNUM(cnum)) &&
+ !IS_VETO_OPLOCK_PATH(cnum,fname))
{
fs_p->granted_oplock = True;
global_oplocks_open++;
from the sharemode. */
/* Paranoia.... */
fsp->granted_oplock = False;
- }
-
global_oplocks_open--;
+ }
/* Santity check - remove this later. JRA */
if(global_oplocks_open < 0)
pcon->dirptr = NULL;
pcon->veto_list = NULL;
pcon->hide_list = NULL;
+ pcon->veto_oplock_list = NULL;
string_set(&pcon->dirpath,"");
string_set(&pcon->user,user);
{
set_namearray( &pcon->veto_list, lp_veto_files(SNUM(cnum)));
set_namearray( &pcon->hide_list, lp_hide_files(SNUM(cnum)));
+ set_namearray( &pcon->veto_oplock_list, lp_veto_oplocks(SNUM(cnum)));
}
{
free_namearray(Connections[cnum].veto_list);
free_namearray(Connections[cnum].hide_list);
+ free_namearray(Connections[cnum].veto_oplock_list);
string_set(&Connections[cnum].user,"");
string_set(&Connections[cnum].dirpath,"");
char *chaine;
char *long_desc;
char *short_desc;
- char *crap;
+ char *crap = NULL;
char *p;
int found=0;