The Samba-Bugzilla – Attachment 10159 Details for
Bug 10728
'net time system' segfaults
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for master.
bug-10728.patchset (text/plain), 4.67 KB, created by
Jeremy Allison
on 2014-07-29 21:29:08 UTC
(
hide
)
Description:
git-am fix for master.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2014-07-29 21:29:08 UTC
Size:
4.67 KB
patch
obsolete
>From 93339d735062858e896795fc1544ae9782043269 Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Tue, 29 Jul 2014 12:29:37 -0700 >Subject: [PATCH 1/2] s3: xml-docs. Ensure users of 'net time' know the remote > server must be specified with -S. > >Bug 10728 - 'net time system' segfaults > >https://bugzilla.samba.org/show_bug.cgi?id=10728 > >Signed-off-by: Jeremy Allison <jra@samba.org> >--- > docs-xml/manpages/net.8.xml | 15 +++++++++++---- > 1 file changed, 11 insertions(+), 4 deletions(-) > >diff --git a/docs-xml/manpages/net.8.xml b/docs-xml/manpages/net.8.xml >index 8524d1f..d497e66 100644 >--- a/docs-xml/manpages/net.8.xml >+++ b/docs-xml/manpages/net.8.xml >@@ -404,7 +404,8 @@ YOU HAVE BEEN WARNED. > <title>TIME</title> > > <para>Without any options, the <command>NET TIME</command> command >-displays the time on the remote server. >+displays the time on the remote server. The remote server must be >+specified with the -S option. > </para> > > </refsect3> >@@ -412,21 +413,27 @@ displays the time on the remote server. > <refsect3> > <title>TIME SYSTEM</title> > >-<para>Displays the time on the remote server in a format ready for <command>/bin/date</command>.</para> >+<para>Displays the time on the remote server in a format ready for <command>/bin/date</command>. >+The remote server must be specified with the -S option. >+</para> > > </refsect3> > > <refsect3> > <title>TIME SET</title> > <para>Tries to set the date and time of the local server to that on >-the remote server using <command>/bin/date</command>. </para> >+the remote server using <command>/bin/date</command>. >+The remote server must be specified with the -S option. >+</para> > > </refsect3> > > <refsect3> > <title>TIME ZONE</title> > >-<para>Displays the timezone in hours from GMT on the remote computer.</para> >+<para>Displays the timezone in hours from GMT on the remote server. >+The remote server must be specified with the -S option. >+</para> > > </refsect3> > </refsect2> >-- >2.0.0.526.g5318336 > > >From b85fdf0d06c5169f5d11bde32701d64321a6ef62 Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Tue, 29 Jul 2014 14:12:31 -0700 >Subject: [PATCH 2/2] s3: net time - fix usage and core dump. > >Bug 10728 - 'net time system' segfaults > >https://bugzilla.samba.org/show_bug.cgi?id=10728 > >Signed-off-by: Jeremy Allison <jra@samba.org> >--- > source3/utils/net_time.c | 30 ++++++++++++++++++++---------- > 1 file changed, 20 insertions(+), 10 deletions(-) > >diff --git a/source3/utils/net_time.c b/source3/utils/net_time.c >index 847b4fe..56ce8f7 100644 >--- a/source3/utils/net_time.c >+++ b/source3/utils/net_time.c >@@ -84,10 +84,10 @@ static const char *systime(time_t t) > int net_time_usage(struct net_context *c, int argc, const char **argv) > { > d_printf(_( >-"net time\n\tdisplays time on a server\n\n" >-"net time system\n\tdisplays time on a server in a format ready for /bin/date\n\n" >-"net time set\n\truns /bin/date with the time from the server\n\n" >-"net time zone\n\tdisplays the timezone in hours from GMT on the remote computer\n\n" >+"net time\n\tdisplays time on a server (-S server)\n\n" >+"net time system\n\tdisplays time on a server (-S server) in a format ready for /bin/date\n\n" >+"net time set\n\truns /bin/date with the time from the server (-S server)\n\n" >+"net time zone\n\tdisplays the timezone in hours from GMT on the remote server (-S server)\n\n" > "\n")); > net_common_flags_usage(c, argc, argv); > return -1; >@@ -99,6 +99,16 @@ static int net_time_set(struct net_context *c, int argc, const char **argv) > struct timeval tv; > int result; > >+ if (c->display_usage || c->opt_host == NULL) { >+ d_printf( "%s\n" >+ "net time set\n" >+ " %s\n", >+ _("Usage:"), >+ _("Set local time to that of remote time " >+ "server (-S server) ")); >+ return 0; >+ } >+ > tv.tv_sec = nettime(c, NULL); > tv.tv_usec=0; > >@@ -118,13 +128,13 @@ static int net_time_system(struct net_context *c, int argc, const char **argv) > { > time_t t; > >- if (c->display_usage) { >+ if (c->display_usage || c->opt_host == NULL) { > d_printf( "%s\n" > "net time system\n" > " %s\n", > _("Usage:"), >- _("Output remote time server time in a format " >- "ready for /bin/date")); >+ _("Output remote time server (-S server) " >+ "time in a format ready for /bin/date")); > return 0; > } > >@@ -144,13 +154,13 @@ static int net_time_zone(struct net_context *c, int argc, const char **argv) > char zsign; > time_t t; > >- if (c->display_usage) { >+ if (c->display_usage || c->opt_host == NULL) { > d_printf( "%s\n" > "net time zone\n" > " %s\n", > _("Usage:"), >- _("Display the remote time server's offset to " >- "UTC")); >+ _("Display the remote time server's (-S server) " >+ "offset to UTC")); > return 0; > } > >-- >2.0.0.526.g5318336 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
ddiss
:
review+
Actions:
View
Attachments on
bug 10728
: 10159 |
10161