Removed function k_strerror, strerror is replaced in libroken.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@524 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
1996-05-12 18:45:57 +00:00
parent f82b0c90ac
commit 13176a9600
7 changed files with 31 additions and 30 deletions

View File

@@ -65,7 +65,7 @@ int krb4_adat(char *auth)
len = krb_mk_safe(&cs, msg, sizeof(cs), &auth_dat.session,
&ctrl_addr, &his_addr);
if(len < 0){
reply(535, "Error creating reply: %s.", k_strerror(errno));
reply(535, "Error creating reply: %s.", strerror(errno));
return -1;
}
base64_encode(msg, len, &p);
@@ -258,7 +258,7 @@ int krb4_write(int fd, void *data, int length)
&auth_dat.session,
&ctrl_addr, &his_addr);
if(bytes == -1){
reply(535, "Failed to make packet: %s.", k_strerror(errno));
reply(535, "Failed to make packet: %s.", strerror(errno));
return -1;
}
data_buffer[0] = (bytes >> 24) & 0xff;

View File

@@ -13,7 +13,7 @@ do_enccopy (int fd1, int fd2, int mode, des_cblock *iv,
if (ret == 0)
return 0;
if (ret < 0) {
fprintf (stderr, "%s: read: %s\n", prog, k_strerror (errno));
fprintf (stderr, "%s: read: %s\n", prog, strerror (errno));
return ret;
}
#ifndef NOENCRYPTION
@@ -22,7 +22,7 @@ do_enccopy (int fd1, int fd2, int mode, des_cblock *iv,
#endif
ret = krb_net_write (fd2, buf, ret);
if (ret < 0) {
fprintf (stderr, "%s: write: %s\n", prog, k_strerror (errno));
fprintf (stderr, "%s: write: %s\n", prog, strerror (errno));
return ret;
}
return 1;
@@ -53,7 +53,7 @@ copy_encrypted (int fd1, int fd2, des_cblock *iv,
ret = select (max(fd1, fd2)+1, &fdset, NULL, NULL, NULL);
if (ret < 0 && errno != EINTR) {
fprintf (stderr, "%s: select: %s\n", prog, k_strerror (errno));
fprintf (stderr, "%s: select: %s\n", prog, strerror (errno));
return 1;
}
if (FD_ISSET(fd1, &fdset)) {
@@ -97,7 +97,7 @@ get_local_xsocket (unsigned dnr)
fd = socket (AF_UNIX, SOCK_STREAM, 0);
if (fd < 0) {
fprintf (stderr, "%s: socket: %s\n", prog, k_strerror(errno));
fprintf (stderr, "%s: socket: %s\n", prog, strerror(errno));
return fd;
}
addr.sun_family = AF_UNIX;
@@ -105,12 +105,12 @@ get_local_xsocket (unsigned dnr)
unlink (addr.sun_path);
if(bind (fd, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
fprintf (stderr, "%s: bind: %s\n", prog,
k_strerror(errno));
strerror(errno));
return -1;
}
if (listen (fd, SOMAXCONN) < 0) {
fprintf (stderr, "%s: listen: %s\n", prog,
k_strerror(errno));
strerror(errno));
return -1;
}
return fd;
@@ -128,14 +128,14 @@ connect_local_xsocket (unsigned dnr)
fd = socket (AF_UNIX, SOCK_STREAM, 0);
if (fd < 0) {
fprintf (stderr, "%s: socket: %s\n", prog, k_strerror(errno));
fprintf (stderr, "%s: socket: %s\n", prog, strerror(errno));
return fd;
}
addr.sun_family = AF_UNIX;
sprintf (addr.sun_path, "/tmp/.X11-unix/X%u", dnr);
if (connect (fd, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
fprintf (stderr, "%s: connect: %s\n", prog,
k_strerror(errno));
strerror(errno));
return -1;
}
return fd;

View File

@@ -42,19 +42,19 @@ connect_host (char *host, des_cblock *key, des_key_schedule schedule)
s = socket (AF_INET, SOCK_STREAM, 0);
if (s < 0) {
fprintf (stderr, "%s: socket failed: %s\n", prog, k_strerror(errno));
fprintf (stderr, "%s: socket failed: %s\n", prog, strerror(errno));
return -1;
}
if (connect (s, (struct sockaddr *)&thataddr, sizeof(thataddr)) < 0) {
fprintf (stderr, "%s: connect(%s) failed: %s\n", prog, host,
k_strerror(errno));
strerror(errno));
return -1;
}
addrlen = sizeof(thisaddr);
if (getsockname (s, (struct sockaddr *)&thisaddr, &addrlen) < 0 ||
addrlen != sizeof(thisaddr)) {
fprintf (stderr, "%s: getsockname(%s) failed: %s\n",
prog, host, k_strerror(errno));
prog, host, strerror(errno));
return -1;
}
status = krb_sendauth (KOPT_DO_MUTUAL, s, &text, "rcmd",
@@ -68,7 +68,7 @@ connect_host (char *host, des_cblock *key, des_key_schedule schedule)
}
if (read (s, &b, sizeof(b)) != sizeof(b)) {
fprintf (stderr, "%s: read: %s\n", prog,
k_strerror(errno));
strerror(errno));
return -1;
}
if (b) {
@@ -96,7 +96,7 @@ active (int fd, char *host, des_cblock *iv, des_key_schedule schedule)
return 1;
if (write (kxd, &zero, sizeof(zero)) != sizeof(zero)) {
fprintf (stderr, "%s: write: %s\n", prog,
k_strerror(errno));
strerror(errno));
return 1;
}
return copy_encrypted (fd, kxd, iv, schedule);
@@ -143,30 +143,30 @@ doit (char *host, int passivep)
rendez_vous = socket (AF_INET, SOCK_STREAM, 0);
if (rendez_vous < 0) {
fprintf (stderr, "%s: socket failed: %s\n", prog,
k_strerror(errno));
strerror(errno));
return 1;
}
memset (&newaddr, 0, sizeof(newaddr));
if (bind (rendez_vous, (struct sockaddr *)&newaddr,
sizeof(newaddr)) < 0) {
fprintf (stderr, "%s: bind: %s\n", prog, k_strerror(errno));
fprintf (stderr, "%s: bind: %s\n", prog, strerror(errno));
return 1;
}
addrlen = sizeof(newaddr);
if (getsockname (rendez_vous, (struct sockaddr *)&newaddr,
&addrlen) < 0) {
fprintf (stderr, "%s: getsockname: %s\n", prog,
k_strerror(errno));
strerror(errno));
return 1;
}
if (listen (rendez_vous, SOMAXCONN) < 0) {
fprintf (stderr, "%s: listen: %s\n", prog, k_strerror(errno));
fprintf (stderr, "%s: listen: %s\n", prog, strerror(errno));
return 1;
}
if (write (otherside, &b, sizeof(b)) != sizeof(b) ||
write (otherside, &newaddr.sin_port, sizeof(newaddr.sin_port))
!= sizeof(newaddr.sin_port)) {
fprintf (stderr, "%s: write: %s\n", prog, k_strerror(errno));
fprintf (stderr, "%s: write: %s\n", prog, strerror(errno));
return 1;
}
close (otherside);
@@ -188,13 +188,13 @@ doit (char *host, int passivep)
continue;
else {
fprintf (stderr, "%s: accept: %s\n", prog,
k_strerror(errno));
strerror(errno));
return 1;
}
child = fork ();
if (child < 0) {
fprintf (stderr, "%s: fork: %s\n", prog,
k_strerror(errno));
strerror(errno));
continue;
} else if (child == 0) {
close (rendez_vous);

View File

@@ -80,7 +80,7 @@ doit_conn (int fd, struct sockaddr_in *thataddr,
sock = socket (AF_INET, SOCK_STREAM, 0);
if (sock < 0) {
char msg[200];
sprintf (msg, "socket: %s", k_strerror(errno));
sprintf (msg, "socket: %s", strerror(errno));
return fatal (sock, msg);
}
if (connect (sock, (struct sockaddr *)thataddr,
@@ -137,13 +137,13 @@ doit(int sock)
continue;
else {
char msg[200];
sprintf (msg, "accept: %s\n", k_strerror (errno));
sprintf (msg, "accept: %s\n", strerror (errno));
return fatal (sock, msg);
}
child = fork ();
if (child < 0) {
char msg[200];
sprintf (msg, "fork: %s\n", k_strerror (errno));
sprintf (msg, "fork: %s\n", strerror (errno));
return fatal(sock, msg);
} else if (child == 0) {
close (localx);

View File

@@ -51,7 +51,7 @@ pop_dropcopy(POP *p, struct passwd *pwp)
if ( (tf=fopen(template,"w+")) == NULL ) { /* failure, bail out */
pop_log(p,POP_PRIORITY,
"Unable to create temporary temporary maildrop '%s': %s",template,
k_strerror(errno));
strerror(errno));
return pop_msg(p,POP_FAILURE,
"System error, can't create temporary file.");
}
@@ -84,7 +84,7 @@ pop_dropcopy(POP *p, struct passwd *pwp)
if ((dfd = open(p->temp_drop,O_RDWR|O_APPEND|O_CREAT,0600)) == -1){
pop_log(p,POP_PRIORITY,
"Unable to open temporary maildrop '%s': %s",p->temp_drop,
k_strerror(errno));
strerror(errno));
return pop_msg(p,POP_FAILURE,
"System error, can't open temporary file, do you own it?");
}
@@ -98,7 +98,7 @@ pop_dropcopy(POP *p, struct passwd *pwp)
/* NOTREACHED */
default:
return pop_msg(p,POP_FAILURE,"flock: '%s': %s", p->temp_drop,
k_strerror(errno));
strerror(errno));
/* NOTREACHED */
}
@@ -112,7 +112,7 @@ pop_dropcopy(POP *p, struct passwd *pwp)
if (k_flock (mfd, K_LOCK_EX) == -1) {
(void)close(mfd) ;
return pop_msg(p,POP_FAILURE, "flock: '%s': %s", p->temp_drop,
k_strerror(errno));
strerror(errno));
}
/* Copy the actual mail drop into the temporary mail drop */

View File

@@ -69,7 +69,7 @@ pop_updt (POP *p)
if ( k_flock(mfd, K_LOCK_EX) == -1 ) {
(void)fclose(md) ;
return pop_msg(p,POP_FAILURE, "flock: '%s': %s", p->temp_drop,
k_strerror(errno));
strerror(errno));
}
/* Go to the right places */

View File

@@ -39,6 +39,7 @@
#endif
#if defined(__linux)
#define AFS_SYSCALL 137
/* Kent Engstr<74>m <kent@lysator.liu.se> 1995-08-22
Linux has no SIGSYS signal. Furthermore, the normal
kernels have no support for AFS. I'm not sure about