mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
This change ensures that only the processes/locked files that
belong to -uUsername are printed when running 'smbstatus -uUsername'
PaulB
(This used to be commit da08e48687
)
This commit is contained in:
parent
3c77f88d45
commit
c069bd8eea
@ -71,32 +71,34 @@ static void print_share_mode(share_mode_entry *e, char *fname)
|
||||
}
|
||||
count++;
|
||||
|
||||
printf("%-5d ",e->pid);
|
||||
switch ((e->share_mode>>4)&0xF) {
|
||||
case DENY_NONE: printf("DENY_NONE "); break;
|
||||
case DENY_ALL: printf("DENY_ALL "); break;
|
||||
case DENY_DOS: printf("DENY_DOS "); break;
|
||||
case DENY_READ: printf("DENY_READ "); break;
|
||||
case DENY_WRITE:printf("DENY_WRITE "); break;
|
||||
}
|
||||
switch (e->share_mode&0xF) {
|
||||
case 0: printf("RDONLY "); break;
|
||||
case 1: printf("WRONLY "); break;
|
||||
case 2: printf("RDWR "); break;
|
||||
}
|
||||
if (Ucrit_checkPid(e->pid)) {
|
||||
printf("%-5d ",e->pid);
|
||||
switch ((e->share_mode>>4)&0xF) {
|
||||
case DENY_NONE: printf("DENY_NONE "); break;
|
||||
case DENY_ALL: printf("DENY_ALL "); break;
|
||||
case DENY_DOS: printf("DENY_DOS "); break;
|
||||
case DENY_READ: printf("DENY_READ "); break;
|
||||
case DENY_WRITE:printf("DENY_WRITE "); break;
|
||||
}
|
||||
switch (e->share_mode&0xF) {
|
||||
case 0: printf("RDONLY "); break;
|
||||
case 1: printf("WRONLY "); break;
|
||||
case 2: printf("RDWR "); break;
|
||||
}
|
||||
|
||||
if((e->op_type &
|
||||
(EXCLUSIVE_OPLOCK|BATCH_OPLOCK)) ==
|
||||
(EXCLUSIVE_OPLOCK|BATCH_OPLOCK))
|
||||
if((e->op_type &
|
||||
(EXCLUSIVE_OPLOCK|BATCH_OPLOCK)) ==
|
||||
(EXCLUSIVE_OPLOCK|BATCH_OPLOCK))
|
||||
printf("EXCLUSIVE+BATCH ");
|
||||
else if (e->op_type & EXCLUSIVE_OPLOCK)
|
||||
else if (e->op_type & EXCLUSIVE_OPLOCK)
|
||||
printf("EXCLUSIVE ");
|
||||
else if (e->op_type & BATCH_OPLOCK)
|
||||
else if (e->op_type & BATCH_OPLOCK)
|
||||
printf("BATCH ");
|
||||
else
|
||||
else
|
||||
printf("NONE ");
|
||||
|
||||
printf(" %s %s",fname,asctime(LocalTime((time_t *)&e->time.tv_sec)));
|
||||
printf(" %s %s",fname,asctime(LocalTime((time_t *)&e->time.tv_sec)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user