mirror of
https://github.com/samba-team/samba.git
synced 2025-01-14 19:24:43 +03:00
loadparm.c: Changed default create mask to 755 to support MAP_ARCHIVE.
server.c: Added check for MAP_ARCHIVE before we set archive bit. Jeremy (jallison@whistle.com)
This commit is contained in:
parent
5a668ff7ba
commit
d21a166277
@ -222,9 +222,9 @@ typedef struct
|
|||||||
char *writelist;
|
char *writelist;
|
||||||
char *volume;
|
char *volume;
|
||||||
int iMinPrintSpace;
|
int iMinPrintSpace;
|
||||||
int iCreate_mode;
|
int iCreate_mask;
|
||||||
int iCreate_force_mode;
|
int iCreate_force_mode;
|
||||||
int iDir_mode;
|
int iDir_mask;
|
||||||
int iDir_force_mode;
|
int iDir_force_mode;
|
||||||
int iMaxConnections;
|
int iMaxConnections;
|
||||||
int iDefaultCase;
|
int iDefaultCase;
|
||||||
@ -302,9 +302,9 @@ static service sDefault =
|
|||||||
NULL, /* writelist */
|
NULL, /* writelist */
|
||||||
NULL, /* volume */
|
NULL, /* volume */
|
||||||
0, /* iMinPrintSpace */
|
0, /* iMinPrintSpace */
|
||||||
0644, /* iCreate_mode */
|
0744, /* iCreate_mask */
|
||||||
0000, /* iCreate_force_mode */
|
0000, /* iCreate_force_mode */
|
||||||
0755, /* iDir_mode */
|
0755, /* iDir_mask */
|
||||||
0000, /* iDir_force_mode */
|
0000, /* iDir_force_mode */
|
||||||
0, /* iMaxConnections */
|
0, /* iMaxConnections */
|
||||||
CASE_LOWER, /* iDefaultCase */
|
CASE_LOWER, /* iDefaultCase */
|
||||||
@ -504,11 +504,11 @@ struct parm_struct
|
|||||||
{"writable", P_BOOLREV, P_LOCAL, &sDefault.bRead_only, NULL},
|
{"writable", P_BOOLREV, P_LOCAL, &sDefault.bRead_only, NULL},
|
||||||
{"max connections", P_INTEGER, P_LOCAL, &sDefault.iMaxConnections, NULL},
|
{"max connections", P_INTEGER, P_LOCAL, &sDefault.iMaxConnections, NULL},
|
||||||
{"min print space", P_INTEGER, P_LOCAL, &sDefault.iMinPrintSpace, NULL},
|
{"min print space", P_INTEGER, P_LOCAL, &sDefault.iMinPrintSpace, NULL},
|
||||||
{"create mask", P_OCTAL, P_LOCAL, &sDefault.iCreate_mode, NULL},
|
{"create mask", P_OCTAL, P_LOCAL, &sDefault.iCreate_mask, NULL},
|
||||||
{"create mode", P_OCTAL, P_LOCAL, &sDefault.iCreate_mode, NULL},
|
{"create mode", P_OCTAL, P_LOCAL, &sDefault.iCreate_mask, NULL},
|
||||||
{"force create mode",P_OCTAL, P_LOCAL, &sDefault.iCreate_force_mode, NULL},
|
{"force create mode",P_OCTAL, P_LOCAL, &sDefault.iCreate_force_mode, NULL},
|
||||||
{"directory mask", P_OCTAL, P_LOCAL, &sDefault.iDir_mode, NULL},
|
{"directory mask", P_OCTAL, P_LOCAL, &sDefault.iDir_mask, NULL},
|
||||||
{"directory mode", P_OCTAL, P_LOCAL, &sDefault.iDir_mode, NULL},
|
{"directory mode", P_OCTAL, P_LOCAL, &sDefault.iDir_mask, NULL},
|
||||||
{"force directory mode", P_OCTAL, P_LOCAL, &sDefault.iDir_force_mode, NULL},
|
{"force directory mode", P_OCTAL, P_LOCAL, &sDefault.iDir_force_mode, NULL},
|
||||||
{"set directory", P_BOOLREV, P_LOCAL, &sDefault.bNo_set_dir, NULL},
|
{"set directory", P_BOOLREV, P_LOCAL, &sDefault.bNo_set_dir, NULL},
|
||||||
{"status", P_BOOL, P_LOCAL, &sDefault.status, NULL},
|
{"status", P_BOOL, P_LOCAL, &sDefault.status, NULL},
|
||||||
@ -929,9 +929,9 @@ FN_LOCAL_BOOL(lp_map_system,bMap_system)
|
|||||||
FN_LOCAL_BOOL(lp_delete_readonly,bDeleteReadonly)
|
FN_LOCAL_BOOL(lp_delete_readonly,bDeleteReadonly)
|
||||||
FN_LOCAL_BOOL(lp_fake_oplocks,bFakeOplocks)
|
FN_LOCAL_BOOL(lp_fake_oplocks,bFakeOplocks)
|
||||||
|
|
||||||
FN_LOCAL_INTEGER(lp_create_mode,iCreate_mode)
|
FN_LOCAL_INTEGER(lp_create_mode,iCreate_mask)
|
||||||
FN_LOCAL_INTEGER(lp_force_create_mode,iCreate_force_mode)
|
FN_LOCAL_INTEGER(lp_force_create_mode,iCreate_force_mode)
|
||||||
FN_LOCAL_INTEGER(lp_dir_mode,iDir_mode)
|
FN_LOCAL_INTEGER(lp_dir_mode,iDir_mask)
|
||||||
FN_LOCAL_INTEGER(lp_force_dir_mode,iDir_force_mode)
|
FN_LOCAL_INTEGER(lp_force_dir_mode,iDir_force_mode)
|
||||||
FN_LOCAL_INTEGER(lp_max_connections,iMaxConnections)
|
FN_LOCAL_INTEGER(lp_max_connections,iMaxConnections)
|
||||||
FN_LOCAL_INTEGER(lp_defaultcase,iDefaultCase)
|
FN_LOCAL_INTEGER(lp_defaultcase,iDefaultCase)
|
||||||
|
@ -194,7 +194,7 @@ int dos_mode(int cnum,char *path,struct stat *sbuf)
|
|||||||
result |= aRONLY;
|
result |= aRONLY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((sbuf->st_mode & S_IXUSR) != 0)
|
if (MAP_ARCHIVE(cnum) && ((sbuf->st_mode & S_IXUSR) != 0))
|
||||||
result |= aARCH;
|
result |= aARCH;
|
||||||
|
|
||||||
if (MAP_SYSTEM(cnum) && ((sbuf->st_mode & S_IXGRP) != 0))
|
if (MAP_SYSTEM(cnum) && ((sbuf->st_mode & S_IXGRP) != 0))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user