From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/8625 Path: news.gmane.org!not-for-mail From: Pepe Aracil Newsgroups: gmane.linux.lib.musl.general Subject: Bug in macro LOG_MAKEPRI in syslog.h Date: Tue, 6 Oct 2015 21:06:49 +0200 Message-ID: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=94eb2c0b8bcefba4c20521745412 X-Trace: ger.gmane.org 1444158444 31711 80.91.229.3 (6 Oct 2015 19:07:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 6 Oct 2015 19:07:24 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-8637-gllmg-musl=m.gmane.org@lists.openwall.com Tue Oct 06 21:07:18 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1ZjXa1-0006wC-Ng for gllmg-musl@m.gmane.org; Tue, 06 Oct 2015 21:07:17 +0200 Original-Received: (qmail 17686 invoked by uid 550); 6 Oct 2015 19:07:15 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 17594 invoked from network); 6 Oct 2015 19:07:02 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nayarsystems.com; s=google; h=mime-version:date:message-id:subject:from:to:content-type; bh=OpHnaRMriwrZFnZc5EXgwOHIcnlbqBut6Nx07gfGlJk=; b=PsWS37LZZYOIjfoShudaWAkzL8hWvJLtT0nQLc48LA6NeUhBhpQ82jW7TTAwbOUGb0 fVuDnrMyj5bUrxDwixzQsiDQ8AVa32qFA4phu6ss9/zy2F7iuGtRve1vp6/qapD8WlFU COnjecQIMz+tKnluxgUY/6pMIbKccKdyKat3g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=OpHnaRMriwrZFnZc5EXgwOHIcnlbqBut6Nx07gfGlJk=; b=GgMSf2NlFtnvmTPvUKSOpfV9e08yRxQx8R1JwMB//anEV75fk6AoJ9jS6zSE7Y3D2Q lH21L1hFbGO2JaZT9V/JZ6Tl9uq40Xg8QZTvFEI7plKst0n5aQw7AnkXhC7M045GeT89 lvgBq2XdfmBbGJDIcLIJXyzl7zeliMQIvIj+PPIGfYfg2dIm52f1WbhMy9++GmwMpF9F TJw4n8uVSfBEDJeOzR1WHYE9hpJ4qBTOj3JRHot+jI+RrfMdWjXwuBi3P/+4snKC7pAD Q5JXUAGsMmRFyKHpLNG8FAlIaSiAkjVvz6l/01XYU/MHLc0H8lWio7P8VEwaoVJWwpc8 guxg== X-Gm-Message-State: ALoCoQkQtwAH1gjmaegPbGtPuQx7OX6rwS37hifwH53ylDgCtMibwKq9pubrAy2fRnGq4YmX8xEd2URzq821nZe/ohJa/d4YCvuqmdm45jZoBYvEk/KVP6DnK06QTpn3O2MTYotaYzDGbPhiIwcCxmv5PE3tmjc/7kMeNwV+75LzsD8vPRdA6yPTPIPvjhAZGripx9gEAhZb X-Received: by 10.195.11.232 with SMTP id el8mr22631743wjd.138.1444158411579; Tue, 06 Oct 2015 12:06:51 -0700 (PDT) X-Relaying-Domain: nayarsystems.com X-Received: by 10.129.158.21 with SMTP id v21mr2869844ywg.248.1444158409250; Tue, 06 Oct 2015 12:06:49 -0700 (PDT) Xref: news.gmane.org gmane.linux.lib.musl.general:8625 Archived-At: --94eb2c0b8bcefba4c20521745412 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi all. Now the macro is defined as: #define LOG_MAKEPRI(f, p) (((f)<<3) | (p)) And must be: #define LOG_MAKEPRI(f, p) ((f) | (p)) The next example posts wrong facility (LOG_LOCAL1) because LOG_LOCAL1 is already rotated ( #define LOG_LOCAL1 (17<<3) ). syslog (LOG_MAKEPRI(LOG_LOCAL1, LOG_ERROR), "Unable to make network connection to %s. Error=3D%m", host); Thanks. --=20 *NOTA LEGAL* Este correo electr=C3=B3nico y, en su caso, cualquier fichero anexo al mism= o, contiene informaci=C3=B3n de car=C3=A1cter confidencial exclusivamente diri= gida a su destinatario y se encuentra protegido por Ley. Cualquier persona distinta de su destinataria tiene prohibida su reproducci=C3=B3n, uso, divulgaci=C3= =B3n, copia o impresi=C3=B3n total o parcial. Si ha recibido este correo electr=C3=B3ni= co por error, se ruega lo notifique de inmediato al remitente borrando el mensaje original juntamente con sus ficheros anexos. Gracias. De conformidad con lo establecido en la LOPD, NAYAR SYSTEMS SL garantiza la adopci=C3=B3n de las medidas necesarias para asegurar el tratamiento confidencial de los datos de car=C3=A1cter personal. As=C3=AD mismo le info= rmamos de la inclusi=C3=B3n de sus datos en un fichero bajo la responsabilidad de NAY= AR SYSTEMS SL, con la finalidad de poder atender los compromisos derivados de la relaci=C3=B3n que mantenemos con usted. Si lo desea, puede ejercer sus derechos de acceso, rectificaci=C3=B3n, cancelaci=C3=B3n y oposici=C3=B3n m= ediante un escrito a la siguiente direcci=C3=B3n: info@nayarsystems.com *LEGAL NOTE* This email and any attachments to it contains is confidential information exclusively intended for the recipients. Any divulgation, copy or distribution to third parties is prohibited without written permission of NAYAR SYSTEMS SL. If you have received this e-mail in error, please notify the sender immediately. In accordance with Law 15/1999 of 13 December on the Protection of Personal Data, the NAYAR SYSTEMS SL guarantees that it has adopted the necessary measures to ensure the confidential treatment of personal information. We also inform you that you can exercise your access, rectification, cancellation and opposition rights by send us a mail to: info@nayarsystems.com --94eb2c0b8bcefba4c20521745412 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi all.


Now the macro is define= d as:
#define LOG_MAKEPRI(f, p) (((f)<<3) | (p))
And= must be:
#define LOG_MAKEPRI(f, p) ((f) | (p))

<= /div>
The next example posts wrong facility (LOG_LOCAL1) because LOG_LO= CAL1 is already rotated ( #define LOG_LOCAL1=C2=A0=C2=A0 (17<<3) ).
syslog (LOG_MAKEPRI(LOG_LOCAL1, LOG_ERROR),
        "Unable to make network connection to %s.  Error=3D%m", h=
ost);

Thanks.

--

<= b>NOTA LEGAL
Este correo electr=C3=B3nico y, en su caso, cualqui= er fichero anexo al mismo, contiene informaci=C3=B3n de car=C3=A1cter confi= dencial exclusivamente dirigida a su destinatario y se encuentra protegido = por Ley. Cualquier persona distinta de su destinataria tiene prohibida su r= eproducci=C3=B3n, uso, divulgaci=C3=B3n, copia o impresi=C3=B3n total o par= cial. Si ha recibido este correo electr=C3=B3nico por error, se ruega lo no= tifique de inmediato al remitente borrando el mensaje original juntamente c= on sus ficheros anexos. Gracias.

De conformidad con lo establecido e= n la LOPD, NAYAR SYSTEMS SL garantiza la adopci=C3=B3n de las medidas neces= arias para asegurar el tratamiento confidencial de los datos de car=C3=A1ct= er personal. As=C3=AD mismo le informamos de la inclusi=C3=B3n de sus datos= en un fichero bajo la responsabilidad de NAYAR SYSTEMS SL, con la finalida= d de poder atender los compromisos derivados de la relaci=C3=B3n que manten= emos con usted. Si lo desea, puede ejercer sus derechos de acceso, rectific= aci=C3=B3n, cancelaci=C3=B3n y oposici=C3=B3n mediante un escrito a la sigu= iente direcci=C3=B3n:=C2=A0info@nayarsystems.com

LEGAL NOTE

This email and any attachments to it = contains is confidential information exclusively intended for the recipient= s. Any divulgation, copy or distribution to third parties is prohibited wit= hout written permission of NAYAR SYSTEMS SL. If you have received this e-ma= il in error, please notify the sender immediately. In accordance with Law 1= 5/1999 of 13 December on the Protection of Personal Data, the NAYAR SYSTEMS= SL guarantees that it has adopted the necessary measures to ensure the con= fidential treatment of personal information. We also inform you that you ca= n exercise your access, rectification, cancellation and opposition rights b= y send us a mail to:=C2=A0info@nayarsystems= .com

--94eb2c0b8bcefba4c20521745412--