mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
nmbd and smbd had different behavior with respect to log files. nmbd would
default to overwrite and smbd would default to append. Also, the -a option
(actually a toggle, such that "-a -a" would set the default) was documented
as append mode for nmbd, and *overwrite mode* for smbd.
nmbd now defaults to append mode, to match smbd. The -a option now always
means append, and I've added the -o option to both, meaning overwrite.
Note that the change to nmbd's default behavior may confuse some people.
I've not seen anything about 2.0.0 changes in the WHATSNEW.txt file.
Where would I document a change like this?
Chris -)-----
(This used to be commit b1d374fb14
)
This commit is contained in:
parent
541cd2a2d9
commit
7fe3a42857
@ -534,6 +534,8 @@ static void usage(char *pname)
|
||||
printf( "\t-n netbiosname. " );
|
||||
printf( "the netbios name to advertise for this host\n");
|
||||
printf( "\t-H hosts file load a netbios hosts file\n" );
|
||||
printf( "\t-a append to log file (default)\n" );
|
||||
printf( "\t-o overwrite log file, don't append\n" );
|
||||
printf( "\n");
|
||||
} /* usage */
|
||||
|
||||
@ -546,6 +548,9 @@ int main(int argc,char *argv[])
|
||||
int opt;
|
||||
extern FILE *dbf;
|
||||
extern char *optarg;
|
||||
extern BOOL append_log;
|
||||
|
||||
append_log = True; /* Default, override with '-o' option. */
|
||||
|
||||
global_nmb_port = NMB_PORT;
|
||||
*host_file = 0;
|
||||
@ -595,7 +600,8 @@ int main(int argc,char *argv[])
|
||||
#endif /* SIGUSR2 */
|
||||
#endif /* MEM_MAN */
|
||||
|
||||
while((opt = getopt(argc, argv, "as:T:I:C:bAi:B:N:Rn:l:d:Dp:hSH:G:f:")) != EOF)
|
||||
while( EOF !=
|
||||
(opt = getopt( argc, argv, "aos:T:I:C:bAi:B:N:Rn:l:d:Dp:hSH:G:f:" )) )
|
||||
{
|
||||
switch (opt)
|
||||
{
|
||||
@ -624,10 +630,10 @@ int main(int argc,char *argv[])
|
||||
strupper(scope);
|
||||
break;
|
||||
case 'a':
|
||||
{
|
||||
extern BOOL append_log;
|
||||
append_log = !append_log;
|
||||
}
|
||||
append_log = True;
|
||||
break;
|
||||
case 'o':
|
||||
append_log = False;
|
||||
break;
|
||||
case 'D':
|
||||
is_daemon = True;
|
||||
|
@ -490,7 +490,8 @@ static void usage(char *pname)
|
||||
{
|
||||
DEBUG(0,("Incorrect program usage - are you sure the command line is correct?\n"));
|
||||
|
||||
printf("Usage: %s [-D] [-p port] [-d debuglevel] [-l log basename] [-s services file]\n",pname);
|
||||
printf("Usage: %s [-D] [-p port] [-d debuglevel] ", pname);
|
||||
printf("[-l log basename] [-s services file]\n" );
|
||||
printf("Version %s\n",VERSION);
|
||||
printf("\t-D become a daemon\n");
|
||||
printf("\t-p port listen on the specified port\n");
|
||||
@ -498,7 +499,8 @@ static void usage(char *pname)
|
||||
printf("\t-l log basename. Basename for log/debug files\n");
|
||||
printf("\t-s services file. Filename of services file\n");
|
||||
printf("\t-P passive only\n");
|
||||
printf("\t-a overwrite log file, don't append\n");
|
||||
printf("\t-a append to log file (default)\n");
|
||||
printf("\t-o overwrite log file, don't append\n");
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
@ -564,7 +566,7 @@ static void usage(char *pname)
|
||||
argc--;
|
||||
}
|
||||
|
||||
while ((opt = getopt(argc, argv, "O:i:l:s:d:Dp:hPaf:")) != EOF)
|
||||
while ( EOF != (opt = getopt(argc, argv, "O:i:l:s:d:Dp:h?Paof:")) )
|
||||
switch (opt) {
|
||||
case 'O':
|
||||
pstrcpy(user_socket_options,optarg);
|
||||
@ -590,10 +592,11 @@ static void usage(char *pname)
|
||||
break;
|
||||
|
||||
case 'a':
|
||||
{
|
||||
extern BOOL append_log;
|
||||
append_log = !append_log;
|
||||
}
|
||||
append_log = True;
|
||||
break;
|
||||
|
||||
case 'o':
|
||||
append_log = False;
|
||||
break;
|
||||
|
||||
case 'D':
|
||||
@ -612,6 +615,7 @@ static void usage(char *pname)
|
||||
break;
|
||||
|
||||
case 'h':
|
||||
case '?':
|
||||
usage(argv[0]);
|
||||
exit(0);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user