Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Jun 2002 00:25:37 +0200
From:      =?ISO-8859-1?Q?Joachim_Str=F6mbergson?= <watchman@ludd.luth.se>
To:        Mike Barcroft <mike@FreeBSD.ORG>
Cc:        Giorgos Keramidas <keramida@FreeBSD.ORG>, audit@FreeBSD.ORG
Subject:   Minor change to rusers (Was: Re: minor header change in src/bin/dd/misc.c)
Message-ID:  <3D125661.9040704@ludd.luth.se>
References:  <20020609014512.GA72307@hades.hell.gr> <20020608220030.D87326@espresso.q9media.com>

next in thread | previous in thread | raw e-mail | index | archive | help

Aloha!

Mike Barcroft wrote:
> Giorgos Keramidas <keramida@FreeBSD.org> writes:
> 
>>The source of bin/dd/misc.c doesn't use any of the functions of
>><strings.h> but uses strlen, which is defined in <string.h>.  The
>>following seems to fix the only warning this file triggers for me.
>>Does it seem ok to you all?
> 
> 
> Yes, it's correct.  <strings.h> is almost always wrong for BSD code.
> I removed the include of <string.h> from <strings.h> when I cleaned up
> those headers for POSIX compatibility, so there are probably other
> mis-includes throughout the system.

It seems that this applies to /usr/bin/rusers too. AFAIK the compilation
goes through and the behaviour seems to be unaltered. How about this patch?

<quote>
--- rusers.c    Wed Jul  4 22:20:31 2001
+++ rusers.c    Fri Jun 21 00:18:02 2002
@@ -46,7 +46,7 @@
 #include <netdb.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <strings.h>
+#include <string.h>
 #include <unistd.h>

 #define MAX_INT                0x7fffffff
</quote>

-- 
Med vänlig hälsning, Cheers!

Joachim Strömbergson
============================================================================
Joachim Strömbergson - ASIC designer, nice to *cute* animals.
    snail:                  phone:                     mail & web:
Sävenäsgatan 5A        +46 31 - 27 98 47          watchman@ludd.luth.se
416 72 Göteborg        +46 733 75 97 02           www.ludd.luth.se/~watchman
============================================================================


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D125661.9040704>