components/proftpd/patches/19575647.patch
branchs11u2-sru
changeset 3451 502e4e1a770e
equal deleted inserted replaced
3450:3b2640ec70f8 3451:502e4e1a770e
       
     1 diff --git a/include/pr-syslog.h b/include/pr-syslog.h
       
     2 index 3eea2be..774a3b0 100644
       
     3 --- a/include/pr-syslog.h
       
     4 +++ b/include/pr-syslog.h
       
     5 @@ -68,7 +68,7 @@
       
     6  #elif defined(__hpux)
       
     7  # define PR_PATH_LOG	"/dev/log.un"
       
     8  #else
       
     9 -# define PR_PATH_LOG	"/dev/log"
       
    10 +# define PR_PATH_LOG	"/dev/conslog"
       
    11  #endif
       
    12  
       
    13  /* Close desriptor used to write to system logger. */
       
    14 diff --git a/lib/pr-syslog.c b/lib/pr-syslog.c
       
    15 index 3a62956..2b3d747 100644
       
    16 --- a/lib/pr-syslog.c
       
    17 +++ b/lib/pr-syslog.c
       
    18 @@ -265,7 +265,7 @@ static void pr_vsyslog(int sockfd, int pri, register const char *fmt,
       
    19    send(sockfd, logbuf, buflen, 0);
       
    20  #else
       
    21  
       
    22 -  /* Prepare the structs for use by putmsg(). As /dev/log is a STREAMS
       
    23 +  /* Prepare the structs for use by putmsg(). As /dev/conslog is a STREAMS
       
    24     * device on Solaris (and possibly other platforms?), putmsg() is
       
    25     * used so that syslog facility and level are properly honored; write()
       
    26     * does not seem to work as desired.
       
    27 @@ -347,22 +347,11 @@ int pr_openlog(const char *ident, int opts, int facility) {
       
    28    }
       
    29  #else
       
    30    sockfd = open(PR_PATH_LOG, O_WRONLY);
       
    31 -
       
    32 -# ifdef SOLARIS2
       
    33 -  /* Workaround for a /dev/log bug (SunSolve bug #4817079) on Solaris. */
       
    34 -  if (sockfd >= 0) {
       
    35 -    struct strioctl ic;
       
    36 -
       
    37 -    ic.ic_cmd = I_ERRLOG;
       
    38 -    ic.ic_timout = 0;
       
    39 -    ic.ic_len = 0;
       
    40 -    ic.ic_dp = NULL;
       
    41 -
       
    42 -    if (ioctl(sockfd, I_STR, &ic) < 0)
       
    43 -      fprintf(stderr, "error setting I_ERRLOG on " PR_PATH_LOG ": %s\n",
       
    44 -        strerror(errno));
       
    45 +  if (sockfd < 0) {
       
    46 +    fprintf(stderr, "failed to open %s: %d, %s\n",
       
    47 +      PR_PATH_LOG, errno, strerror(errno));
       
    48 +    exit(EXIT_FAILURE);
       
    49    }
       
    50 -# endif /* SOLARIS2 */
       
    51  #endif
       
    52  
       
    53    return sockfd;