mirror of
https://github.com/samba-team/samba.git
synced 2025-09-07 21:44:22 +03:00
- workaround filer lsa lookup bug for unknown sids
- add \ at start of name if not needed (another filer workaround)
This commit is contained in:
@@ -118,7 +118,8 @@ static void SidToString(fstring str, DOM_SID *sid)
|
|||||||
|
|
||||||
if (!open_policy_hnd() ||
|
if (!open_policy_hnd() ||
|
||||||
cli_lsa_lookup_sids(&lsa_cli, &pol, 1, sid, &names, &types,
|
cli_lsa_lookup_sids(&lsa_cli, &pol, 1, sid, &names, &types,
|
||||||
&num_names) != NT_STATUS_NOPROBLEMO) {
|
&num_names) != NT_STATUS_NOPROBLEMO ||
|
||||||
|
!names || !names[0]) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -834,7 +835,7 @@ You can string acls together with spaces, commas or newlines\n\
|
|||||||
int main(int argc,char *argv[])
|
int main(int argc,char *argv[])
|
||||||
{
|
{
|
||||||
char *share;
|
char *share;
|
||||||
char *filename;
|
pstring filename;
|
||||||
extern char *optarg;
|
extern char *optarg;
|
||||||
extern int optind;
|
extern int optind;
|
||||||
extern FILE *dbf;
|
extern FILE *dbf;
|
||||||
@@ -860,7 +861,7 @@ You can string acls together with spaces, commas or newlines\n\
|
|||||||
setup_logging(argv[0],True);
|
setup_logging(argv[0],True);
|
||||||
|
|
||||||
share = argv[1];
|
share = argv[1];
|
||||||
filename = argv[2];
|
pstrcpy(filename, argv[2]);
|
||||||
all_string_sub(share,"/","\\",0);
|
all_string_sub(share,"/","\\",0);
|
||||||
|
|
||||||
argc -= 2;
|
argc -= 2;
|
||||||
@@ -962,14 +963,12 @@ You can string acls together with spaces, commas or newlines\n\
|
|||||||
if (!cli) exit(EXIT_FAILED);
|
if (!cli) exit(EXIT_FAILED);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
all_string_sub(filename, "/", "\\", 0);
|
||||||
char *s;
|
if (filename[0] != '\\') {
|
||||||
|
pstring s;
|
||||||
s = filename;
|
s[0] = '\\';
|
||||||
while(*s) {
|
safe_strcpy(&s[1], filename, sizeof(pstring)-1);
|
||||||
if (*s == '/') *s = '\\';
|
pstrcpy(filename, s);
|
||||||
s++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Perform requested action */
|
/* Perform requested action */
|
||||||
|
Reference in New Issue
Block a user