summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2004-07-30 17:27:23 +0000
committeryar <yar@FreeBSD.org>2004-07-30 17:27:23 +0000
commitdc8c8c95c0ae022cf290aef5899d00ce8e083dcd (patch)
treec98835b17ba3499d77104941f2f190dffb6a60fb /libexec
parentcc10a9c33b8fe66944273592dddfcaf73c9d0005 (diff)
downloadFreeBSD-src-dc8c8c95c0ae022cf290aef5899d00ce8e083dcd.zip
FreeBSD-src-dc8c8c95c0ae022cf290aef5899d00ce8e083dcd.tar.gz
Kill casts to (uid_t) obviously left from the K&R era.
Prototyping library functions in header files has rendered them superfluous.
Diffstat (limited to 'libexec')
-rw-r--r--libexec/ftpd/ftpd.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c
index 87e26ce..72456ae 100644
--- a/libexec/ftpd/ftpd.c
+++ b/libexec/ftpd/ftpd.c
@@ -1155,12 +1155,12 @@ end_login(void)
int e;
#endif
- (void) seteuid((uid_t)0);
+ (void) seteuid(0);
if (logged_in && dowtmp)
ftpd_logwtmp(ttyline, "", NULL);
pw = NULL;
#ifdef LOGIN_CAP
- setusercontext(NULL, getpwuid(0), (uid_t)0,
+ setusercontext(NULL, getpwuid(0), 0,
LOGIN_SETPRIORITY|LOGIN_SETRESOURCES|LOGIN_SETUMASK|
LOGIN_SETMAC);
#endif
@@ -1429,7 +1429,7 @@ skip:
return;
}
}
- setusercontext(lc, pw, (uid_t)0,
+ setusercontext(lc, pw, 0,
LOGIN_SETLOGIN|LOGIN_SETGROUP|LOGIN_SETPRIORITY|
LOGIN_SETRESOURCES|LOGIN_SETUMASK|LOGIN_SETMAC);
#else
@@ -1526,7 +1526,7 @@ skip:
* b) NFS mounted homedirs w/restrictive permissions will be accessible
* (uid 0 has no root power over NFS if not mapped explicitly.)
*/
- if (seteuid((uid_t)pw->pw_uid) < 0) {
+ if (seteuid(pw->pw_uid) < 0) {
reply(550, "Can't set uid.");
goto bad;
}
@@ -1819,7 +1819,7 @@ getdatasock(char *mode)
/* anchor socket to avoid multi-homing problems */
data_source = ctrl_addr;
data_source.su_port = htons(dataport);
- (void) seteuid((uid_t)0);
+ (void) seteuid(0);
for (tries = 1; ; tries++) {
/*
* We should loop here since it's possible that
@@ -1837,7 +1837,7 @@ getdatasock(char *mode)
goto bad;
sleep(tries);
}
- (void) seteuid((uid_t)pw->pw_uid);
+ (void) seteuid(pw->pw_uid);
#ifdef IP_TOS
if (data_source.su_family == AF_INET)
{
@@ -1867,7 +1867,7 @@ getdatasock(char *mode)
bad:
/* Return the real value of errno (close may change it) */
t = errno;
- (void) seteuid((uid_t)pw->pw_uid);
+ (void) seteuid(pw->pw_uid);
(void) close(s);
errno = t;
return (NULL);
@@ -2621,7 +2621,7 @@ dologout(int status)
transflag = 0;
if (logged_in && dowtmp) {
- (void) seteuid((uid_t)0);
+ (void) seteuid(0);
ftpd_logwtmp(ttyline, "", NULL);
}
/* beware of flushing buffers after a SIGPIPE */
@@ -2688,7 +2688,7 @@ passive(void)
if (setsockopt(pdata, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) < 0)
syslog(LOG_WARNING, "pdata setsockopt (SO_REUSEADDR): %m");
- (void) seteuid((uid_t)0);
+ (void) seteuid(0);
#ifdef IP_PORTRANGE
if (ctrl_addr.su_family == AF_INET) {
@@ -2716,7 +2716,7 @@ passive(void)
if (bind(pdata, (struct sockaddr *)&pasv_addr, pasv_addr.su_len) < 0)
goto pasv_error;
- (void) seteuid((uid_t)pw->pw_uid);
+ (void) seteuid(pw->pw_uid);
len = sizeof(pasv_addr);
if (getsockname(pdata, (struct sockaddr *) &pasv_addr, &len) < 0)
@@ -2740,7 +2740,7 @@ passive(void)
return;
pasv_error:
- (void) seteuid((uid_t)pw->pw_uid);
+ (void) seteuid(pw->pw_uid);
(void) close(pdata);
pdata = -1;
perror_reply(425, "Can't open passive connection");
@@ -2798,7 +2798,7 @@ long_passive(char *cmd, int pf)
if (setsockopt(pdata, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) < 0)
syslog(LOG_WARNING, "pdata setsockopt (SO_REUSEADDR): %m");
- (void) seteuid((uid_t)0);
+ (void) seteuid(0);
pasv_addr = ctrl_addr;
pasv_addr.su_port = 0;
@@ -2828,7 +2828,7 @@ long_passive(char *cmd, int pf)
if (bind(pdata, (struct sockaddr *)&pasv_addr, len) < 0)
goto pasv_error;
- (void) seteuid((uid_t)pw->pw_uid);
+ (void) seteuid(pw->pw_uid);
if (getsockname(pdata, (struct sockaddr *) &pasv_addr, &len) < 0)
goto pasv_error;
@@ -2877,7 +2877,7 @@ long_passive(char *cmd, int pf)
}
pasv_error:
- (void) seteuid((uid_t)pw->pw_uid);
+ (void) seteuid(pw->pw_uid);
(void) close(pdata);
pdata = -1;
perror_reply(425, "Can't open passive connection");
OpenPOWER on IntegriCloud