]> andersk Git - openssh.git/commitdiff
- (bal) Use chown() if fchown() does not exist in ftp-server.c patch by
authormouring <mouring>
Tue, 13 Feb 2001 02:40:56 +0000 (02:40 +0000)
committermouring <mouring>
Tue, 13 Feb 2001 02:40:56 +0000 (02:40 +0000)
   Tim Rice <tim@multitalents.net>

ChangeLog
configure.in
sftp-server.c

index 748625da310d7f5f15c0bf20176f284aa533ba63..d6bbe8f6231098966cb7b14a3478cfebb8032c0b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,8 @@
  - (bal) Cleaned out bsd-snprintf.c.  VARARGS have been banished and
    I did a base KNF over the whe whole file to make it more acceptable.
    (backed out of original patch and removed it from ChangeLog)
+ - (bal) Use chown() if fchown() does not exist in ftp-server.c patch by
+   Tim Rice <tim@multitalents.net>
 
 20010212
  - (djm) Update Redhat specfile to allow --define "skip_x11_askpass 1", 
index dc0be2bd3306f2625cb5ffa93baf852b59136879..e55006152f0f710a713a3cfc1e1b700df36bc8c7 100644 (file)
@@ -325,10 +325,10 @@ AC_CHECK_FUNC(utimes,
 )
 
 # Checks for header files.
-AC_CHECK_HEADERS(bstring.h endian.h floatingpoint.h getopt.h lastlog.h limits.h login.h login_cap.h maillock.h netdb.h netgroup.h netinet/in_systm.h paths.h poll.h pty.h regex.h shadow.h security/pam_appl.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/queue.h sys/select.h sys/stat.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h sys/un.h stddef.h time.h ttyent.h usersec.h util.h utime.h utmp.h utmpx.h vis.h)
+AC_CHECK_HEADERS(bstring.h endian.h floatingpoint.h getopt.h lastlog.h limits.h login.h login_cap.h maillock.h netdb.h netgroup.h netinet/in_systm.h paths.h poll.h pty.h regex.h shadow.h security/pam_appl.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h sys/poll.h sys/queue.h sys/select.h sys/stat.h sys/stropts.h sys/sysmacros.h sys/time.h sys/ttcompat.h sys/un.h stdarg.h stddef.h time.h ttyent.h usersec.h util.h utime.h utmp.h utmpx.h vis.h)
 
 dnl    Checks for library functions.
-AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_sa clock fchmod freeaddrinfo futimes gai_strerror getcwd getaddrinfo getgrouplist getnameinfo getrlimit getrusage getttyent inet_aton inet_ntoa innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty realpath rresvport_af setdtablesize setenv seteuid setlogin setproctitle setreuid setrlimit setsid sigaction sigvec snprintf strerror strlcat strlcpy strmode strsep strtok_r sysconf tcgetpgrp utimes vsnprintf vhangup vis waitpid _getpty __b64_ntop)
+AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_sa clock fchown fchmod freeaddrinfo futimes gai_strerror getcwd getaddrinfo getgrouplist getnameinfo getrlimit getrusage getttyent inet_aton inet_ntoa innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty realpath rresvport_af setdtablesize setenv seteuid setlogin setproctitle setreuid setrlimit setsid sigaction sigvec snprintf strerror strlcat strlcpy strmode strsep strtok_r sysconf tcgetpgrp utimes vsnprintf vhangup vis waitpid _getpty __b64_ntop)
 dnl    Checks for time functions
 AC_CHECK_FUNCS(gettimeofday time)
 dnl    Checks for libutil functions
index 346411e798ba1771926465aa0dc0019d8f250406..0291da2063de61dc4981cdb6aac29d9de1b1fb32 100644 (file)
@@ -609,7 +609,11 @@ process_fsetstat(void)
                                status = errno_to_portable(errno);
                }
                if (a->flags & SSH2_FILEXFER_ATTR_UIDGID) {
+#ifdef HAVE_FCHOWN
                        ret = fchown(fd, a->uid, a->gid);
+#else
+                       ret = chown(name, a->uid, a->gid);
+#endif
                        if (ret == -1)
                                status = errno_to_portable(errno);
                }
This page took 0.060918 seconds and 5 git commands to generate.