1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-08 04:58:40 +03:00

s3:smbstatus: Fix some nonempty blank lines

This commit is contained in:
Volker Lendecke 2009-09-18 18:10:54 +02:00
parent ac3b58b851
commit 89e80bfe4f

View File

@ -2,17 +2,17 @@
Unix SMB/CIFS implementation.
status reporting
Copyright (C) Andrew Tridgell 1994-1998
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@ -61,25 +61,25 @@ static unsigned int Ucrit_checkUid(uid_t uid)
{
if ( !Ucrit_IsActive )
return 1;
if ( uid == Ucrit_uid )
return 1;
return 0;
}
static unsigned int Ucrit_checkPid(struct server_id pid)
{
int i;
if ( !Ucrit_IsActive )
return 1;
for (i=0;i<Ucrit_MaxPid;i++) {
if (cluster_id_equal(&pid, &Ucrit_pid[i]))
return 1;
}
return 0;
}
@ -96,7 +96,7 @@ static bool Ucrit_addPid( struct server_id pid )
}
Ucrit_pid[Ucrit_MaxPid++] = pid;
return True;
}
@ -276,7 +276,7 @@ static int traverse_sessionid(struct db_record *db, void *state)
numeric_only ? uid_str : uidtoname(sessionid.uid),
numeric_only ? gid_str : gidtoname(sessionid.gid),
sessionid.remote_machine, sessionid.hostname);
return 0;
}
@ -312,9 +312,9 @@ static int traverse_sessionid(struct db_record *db, void *state)
load_case_tables();
setup_logging(argv[0],True);
dbf = x_stderr;
if (getuid() != geteuid()) {
d_printf("smbstatus should not be run setuid\n");
ret = 1;
@ -323,7 +323,7 @@ static int traverse_sessionid(struct db_record *db, void *state)
pc = poptGetContext(NULL, argc, (const char **) argv, long_options,
POPT_CONTEXT_KEEP_FIRST);
while ((c = poptGetNextOpt(pc)) != -1) {
switch (c) {
case 'p':
@ -432,7 +432,7 @@ static int traverse_sessionid(struct db_record *db, void *state)
goto done;
}
}
if ( show_shares ) {
if (verbose) {
d_printf("Opened %s\n", lock_path("connections.tdb"));
@ -441,10 +441,10 @@ static int traverse_sessionid(struct db_record *db, void *state)
if (brief) {
goto done;
}
d_printf("\nService pid machine Connected at\n");
d_printf("-------------------------------------------------------\n");
connections_forall(traverse_fn1, NULL);
d_printf("\n");
@ -475,7 +475,7 @@ static int traverse_sessionid(struct db_record *db, void *state)
ret = 1;
goto done;
}
result = share_mode_forall(print_share_mode, NULL);
if (result == 0) {
@ -483,13 +483,13 @@ static int traverse_sessionid(struct db_record *db, void *state)
} else if (result == -1) {
d_printf("locked file list truncated\n");
}
d_printf("\n");
if (show_brl) {
brl_forall(print_brl, NULL);
}
locking_end();
}