summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1997-09-15 05:43:37 +0000
committerAndrew Tridgell <tridge@samba.org>1997-09-15 05:43:37 +0000
commit552818e60eff4a87ece94f98c33424c93354bf6c (patch)
treeb5be8d5d2efd9aa4eef8823ea5283a2178385f70 /source3/lib
parentddb2ce9d8100bd2c0475032b99869624db36304c (diff)
downloadsamba-552818e60eff4a87ece94f98c33424c93354bf6c.tar.gz
samba-552818e60eff4a87ece94f98c33424c93354bf6c.tar.bz2
samba-552818e60eff4a87ece94f98c33424c93354bf6c.zip
- change a lot of occurances of errno to use strerror(errno). We can't
assume all our users are programmers :-) - automatically create the smbpasswd file if it doesn't exist when running smbpasswd. (This used to be commit 1d2361bd2dec35bce029699f54c6a61fa739fa4b)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index b0213912d1..22c1c3e43d 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1488,7 +1488,7 @@ char *GetWd(char *str)
if (!sys_getwd(s))
{
- DEBUG(0,("Getwd failed, errno %d\n",errno));
+ DEBUG(0,("Getwd failed, errno %s\n",strerror(errno)));
return (NULL);
}
@@ -1951,7 +1951,7 @@ int read_udp_socket(int fd,char *buf,int len)
bzero((char *)&lastip,sizeof(lastip));
ret = recvfrom(fd,buf,len,0,&sock,&socklen);
if (ret <= 0) {
- DEBUG(2,("read socket failed. ERRNO=%d\n",errno));
+ DEBUG(2,("read socket failed. ERRNO=%s\n",strerror(errno)));
return(0);
}
@@ -2408,8 +2408,8 @@ BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type)
ret = (sendto(out_fd,buf,len,0,(struct sockaddr *)&sock_out,sizeof(sock_out)) >= 0);
if (!ret)
- DEBUG(0,("Packet send to %s(%d) failed ERRNO=%d\n",
- inet_ntoa(ip),port,errno));
+ DEBUG(0,("Packet send to %s(%d) failed ERRNO=%s\n",
+ inet_ntoa(ip),port,strerror(errno)));
close(out_fd);
return(ret);