su on 10.2: TERM: Undefined variable

2015-11-21 Thread Miroslav Lachman
I noticed some weird behavior of "su" command in shell scripts running 
from cron after upgrade from FreeBSD 8.4 to 10.2.


If I have this in script

su -m www -c 'ls -l'

then I get "TERM: Undefined variable" on the stderr if this script is 
run from cron.

It works fine on FreeBSD 8.4

Is it intentional behavior?

Miroslav Lachman
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


FreeBSD_STABLE_10-i386 - Build #657 - Failure

2015-11-21 Thread jenkins-admin
FreeBSD_STABLE_10-i386 - Build #657 - Failure:

Build information: https://jenkins.FreeBSD.org/job/FreeBSD_STABLE_10-i386/657/
Full change log: 
https://jenkins.FreeBSD.org/job/FreeBSD_STABLE_10-i386/657/changes
Full build log: 
https://jenkins.FreeBSD.org/job/FreeBSD_STABLE_10-i386/657/console

Change summaries:

291134 by kib:
MFC r290492:
Move intmax_t and uintmax_t type declarations to sys/_stdint.h.



The end of the build log:

[...truncated 101003 lines...]
--- lib.all__D ---
--- localzone.po ---
cc  -pg  -I/usr/src/lib/libunbound/../../contrib/unbound 
-I/usr/src/lib/libunbound/../../contrib/ldns -I/usr/obj/usr/src/lib/libunbound 
-std=gnu99 -Qunused-arguments  -fstack-protector -Wsystem-headers -Werror -Wall 
-Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign 
-Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable 
-Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality 
-Wno-unused-function -Wno-enum-conversion -c 
/usr/src/lib/libunbound/../../contrib/unbound/services/localzone.c -o 
localzone.po
--- sbin.all__D ---
--- main.o ---
cc  -O2 -pipe   -I/usr/src/sbin/fsck_ffs -I/usr/src/sbin/fsck_ffs/../mount 
-std=gnu99 -Qunused-arguments  -fstack-protector -Wsystem-headers -Werror -Wall 
-Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body 
-Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare 
-Wno-unused-value -Wno-parentheses-equality -Wno-unused-function 
-Wno-enum-conversion -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter 
-c /usr/src/sbin/fsck_ffs/main.c -o main.o
--- all_subdir_fsck_msdosfs ---
===> sbin/fsck_msdosfs (all)
--- main.o ---
cc  -O2 -pipe   -I/usr/src/sbin/fsck_msdosfs/../fsck -std=gnu99 
-Qunused-arguments  -fstack-protector -Wsystem-headers -Werror -Wall 
-Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings 
-Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline 
-Wnested-externs -Wredundant-decls -Wold-style-definition 
-Wmissing-variable-declarations -Wno-pointer-sign -Wno-empty-body 
-Wno-string-plus-int -Wno-unused-const-variable -c 
/usr/src/sbin/fsck_msdosfs/main.c -o main.o
--- secure.all__D ---
--- a_octet.po ---
cc  -pg  -O2 -pipe   -DTERMIOS -DANSI_SOURCE 
-I/usr/src/secure/lib/libcrypto/../../../crypto/openssl 
-I/usr/src/secure/lib/libcrypto/../../../crypto/openssl/crypto 
-I/usr/obj/usr/src/secure/lib/libcrypto -DOPENSSL_THREADS -DDSO_DLFCN 
-DHAVE_DLFCN_H -DL_ENDIAN -DOPENSSL_IA32_SSE2 -DAES_ASM -DVPAES_ASM 
-DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m 
-DMD5_ASM -DGHASH_ASM -DRMD160_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM 
-DWHIRLPOOL_ASM 
-I/usr/src/secure/lib/libcrypto/../../../crypto/openssl/crypto/asn1 
-I/usr/src/secure/lib/libcrypto/../../../crypto/openssl/crypto/evp 
-I/usr/src/secure/lib/libcrypto/../../../crypto/openssl/crypto/modes -std=gnu89 
-Qunused-arguments  -fstack-protector -Wno-pointer-sign -Wno-empty-body 
-Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare 
-Wno-unused-value -Wno-parentheses-equality -Wno-unused-function 
-Wno-enum-conversion -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter 
-Wno-parentheses -c /usr/src/sec
 ure/lib/libcrypto/../../../crypto/openssl/crypto/asn1/a_octet.c -o a_octet.po
--- lib.all__D ---
--- locks.po ---
cc  -pg  -I/usr/src/lib/libunbound/../../contrib/unbound 
-I/usr/src/lib/libunbound/../../contrib/ldns -I/usr/obj/usr/src/lib/libunbound 
-std=gnu99 -Qunused-arguments  -fstack-protector -Wsystem-headers -Werror -Wall 
-Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign 
-Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable 
-Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality 
-Wno-unused-function -Wno-enum-conversion -c 
/usr/src/lib/libunbound/../../contrib/unbound/util/locks.c -o locks.po
--- sbin.all__D ---
--- check.o ---
cc  -O2 -pipe   -I/usr/src/sbin/fsck_msdosfs/../fsck -std=gnu99 
-Qunused-arguments  -fstack-protector -Wsystem-headers -Werror -Wall 
-Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings 
-Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline 
-Wnested-externs -Wredundant-decls -Wold-style-definition 
-Wmissing-variable-declarations -Wno-pointer-sign -Wno-empty-body 
-Wno-string-plus-int -Wno-unused-const-variable -c 
/usr/src/sbin/fsck_msdosfs/check.c -o check.o
--- secure.all__D ---
--- a_print.po ---
cc  -pg  -O2 -pipe   -DTERMIOS -DANSI_SOURCE 
-I/usr/src/secure/lib/libcrypto/../../../crypto/openssl 
-I/usr/src/secure/lib/libcrypto/../../../crypto/openssl/crypto 
-I/usr/obj/usr/src/secure/lib/libcrypto -DOPENSSL_THREADS -DDSO_DLFCN 
-DHAVE_DLFCN_H -D

Re: NETMAP and off-by-one?

2015-11-21 Thread Slawa Olhovchenkov
On Sat, Nov 14, 2015 at 11:46:58AM +0300, Slawa Olhovchenkov wrote:

> On Fri, Nov 13, 2015 at 03:40:04PM -0800, Luigi Rizzo wrote:
> 
> > On Fri, Nov 13, 2015 at 1:30 PM, Slawa Olhovchenkov  wrote:
> > > I am see strange things: like NETMAP stop transmit after `head` and `cur`
> > > touch `tail`.
> > >
> > > But:
> > >
> > > /*
> > >  * check if space is available in the ring.
> > >  */
> > > static inline int
> > > nm_ring_empty(struct netmap_ring *ring)
> > > {
> > > return (ring->cur == ring->tail);
> > > }
> > >
> > > i.e. if cur == (tail-1) mod ring_size -- space is available in the
> > > ring and I can put packet in output buffer.
> > 
> > The design requires to leave at least one empty slot in the buffer.
> > The name of the function is correct, the comment is probably not,
> > unless a bug has creeped in recently the code was very careful
> > in not using the free slot that separates the two regions.
> 
> Please, do some clarification, in case for transmit patch:
> 
> - can I put in txring in case cur == (tail-1) mod ring_size?
> - can I use poll with only `events |= POLLIN` for transmiting?
> 
> in case for receive patch:
> 
> - can I detect input overflow?

I am asks this questions becaus in may case don't see automatic txsync
on poll:

device open as

  np->nr_ringid = NETMAP_DO_RX_POLL;
  np->nr_flags = NR_REG_ALL_NIC;
  rc = ioctl(balancer.inside.fd, NIOCREGIF, np);

poll do as

  pollfd[1].fd = thr->inside.fd;  pollfd[1].events |= POLLIN;
  poll(pollfd, nfd, 1000);

and I don't see output sysncing w/o pollfd[1].events |= POLLIN | POLLOUT;
Only one round packet outputs I see and no slot updates.
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: su on 10.2: TERM: Undefined variable

2015-11-21 Thread Michael B. Eichorn
On Sat, 2015-11-21 at 13:31 +0100, Miroslav Lachman wrote:
> I noticed some weird behavior of "su" command in shell scripts
> running 
> from cron after upgrade from FreeBSD 8.4 to 10.2.
> 
> If I have this in script
> 
> su -m www -c 'ls -l'
> 
> then I get "TERM: Undefined variable" on the stderr if this script is
> run from cron.
> It works fine on FreeBSD 8.4
> 
> Is it intentional behavior?
> 
> Miroslav Lachman

I cannot reproduce your problem. I used the following script:

#!/bin/sh

echo "BEGIN TEST"
echo $TERM

su -m www -c 'ls -l'

echo $TERM
echo "END TEST"

crontab is:
*   *   *   *   *   /root/test.sh

and the result is:

BEGIN TEST

total 520765
-rw-r--r--   1 root  wheel  724002816 Aug 12 11:45 FreeBSD-10.2-
RELEASE-amd64-disc1.iso
-rwxr-xr-x   1 root  wheel 90 Nov 21 15:33 test.sh

END TEST

# freebsd-version
10.2-RELEASE-p7

smime.p7s
Description: S/MIME cryptographic signature