UTF-8 problem with php-7.4

2020-09-09 Thread Bambero
Hi,

It seems that perl regular expressions lost one polish letter (ą):
https://www.compart.com/en/unicode/U+0105

I can see this problem only under OpenBSD 6.7 with php-7.4 (same version of
php under linux is OK)

Ex.:

PHP 7.4.10 or 7.4.5


current port build under 6.2

2018-12-11 Thread Bambero
doc/clamav/html/UserManual/Signatures/DatabaseInfo.html
does not exist
Error:
/usr/ports/pobj/clamav-0.101.0/fake-amd64/etc/rc.d/share/doc/clamav/html/UserManual/Signatures/DynamicConfig.html
does not exist
Error:
/usr/ports/pobj/clamav-0.101.0/fake-amd64/etc/rc.d/share/doc/clamav/html/UserManual/Signatures/EncryptedArchives.html
does not exist
Error:
/usr/ports/pobj/clamav-0.101.0/fake-amd64/etc/rc.d/share/doc/clamav/html/UserManual/Signatures/ExtendedSignatures.html
does not exist
Error:
/usr/ports/pobj/clamav-0.101.0/fake-amd64/etc/rc.d/share/doc/clamav/html/UserManual/Signatures/FileTypeMagic.html
does not exist
Error:
/usr/ports/pobj/clamav-0.101.0/fake-amd64/etc/rc.d/share/doc/clamav/html/UserManual/Signatures/FileTypes.html
does not exist
Error:
/usr/ports/pobj/clamav-0.101.0/fake-amd64/etc/rc.d/share/doc/clamav/html/UserManual/Signatures/FunctionalityLevels.html
does not exist
Error:
/usr/ports/pobj/clamav-0.101.0/fake-amd64/etc/rc.d/share/doc/clamav/html/UserManual/Signatures/HashSignatures.html
does not exist
Error:
/usr/ports/pobj/clamav-0.101.0/fake-amd64/etc/rc.d/share/doc/clamav/html/UserManual/Signatures/LogicalSignatures.html
does not exist
Error:
/usr/ports/pobj/clamav-0.101.0/fake-amd64/etc/rc.d/share/doc/clamav/html/UserManual/Signatures/PhishSigs.html
does not exist
Error:
/usr/ports/pobj/clamav-0.101.0/fake-amd64/etc/rc.d/share/doc/clamav/html/UserManual/Signatures/Whitelists.html
does not exist
Error:
/usr/ports/pobj/clamav-0.101.0/fake-amd64/etc/rc.d/share/doc/clamav/html/UserManual/Signatures/YaraRules.html
does not exist
Error:
/usr/ports/pobj/clamav-0.101.0/fake-amd64/etc/rc.d/share/doc/clamav/html/UserManual/Usage.html
does not exist
Error:
/usr/ports/pobj/clamav-0.101.0/fake-amd64/etc/rc.d/share/doc/clamav/html/UserManual/Usage/Configuration.html
does not exist
Error:
/usr/ports/pobj/clamav-0.101.0/fake-amd64/etc/rc.d/share/doc/clamav/html/UserManual/Usage/Scanning.html
does not exist
Error:
/usr/ports/pobj/clamav-0.101.0/fake-amd64/etc/rc.d/share/doc/clamav/html/UserManual/Usage/SignatureManagement.html
does not exist
Error:
/usr/ports/pobj/clamav-0.101.0/fake-amd64/etc/rc.d/share/doc/clamav/html/UserManual/development.html
does not exist
Error:
/usr/ports/pobj/clamav-0.101.0/fake-amd64/etc/rc.d/share/doc/clamav/html/UserManual/images/demon.png
does not exist
Error:
/usr/ports/pobj/clamav-0.101.0/fake-amd64/etc/rc.d/share/doc/clamav/html/UserManual/libclamav.html
does not exist
Error:
/usr/ports/pobj/clamav-0.101.0/fake-amd64/etc/rc.d/share/examples/clamav/clamav-milter.conf.sample
does not exist
Error:
/usr/ports/pobj/clamav-0.101.0/fake-amd64/etc/rc.d/share/examples/clamav/clamd.conf.sample
does not exist
Error:
/usr/ports/pobj/clamav-0.101.0/fake-amd64/etc/rc.d/share/examples/clamav/ex1.c
does not exist
Error:
/usr/ports/pobj/clamav-0.101.0/fake-amd64/etc/rc.d/share/examples/clamav/freshclam.conf.sample
does not exist
Fatal error: can't continue
 at /usr/libdata/perl5/OpenBSD/PkgCreate.pm line 1514.
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:1950
'/usr/ports/packages/amd64/all/clamav-0.101.0p1.tgz')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2446
'_internal-package')
*** Error 1 in /usr/ports/security/clamav (/usr/ports/infrastructure/mk/
bsd.port.mk:2425 'package')

Any ideas?

Thanks,
Bambero


Re: mariaDB - limits problem?

2018-03-05 Thread Bambero
Thanks, a lot. I think this is the point.

But is there a way to chceck currently locked files?
Open files I can check with:

fstat | awk ' { print ( $1 ) }' | sort | uniq -c | sort -n
or:
sysctl kern.nfiles


On Mon, Mar 5, 2018 at 1:02 PM, Otto Moerbeek <o...@drijf.net> wrote:

> On Mon, Mar 05, 2018 at 12:43:05PM +0100, Bambero wrote:
>
> > Thanks for the answer.
> > This prblem is not related with open-files limit. This error is completly
> > different.
> > I have a special class in login.conf so open files limit we should
> exclude
> > in this case:
> >
> > mysqld:\
> > <-->:openfiles-cur=1024:\
> > <-->:openfiles-max=2048:\
> > <-->:tc=daemon:
> >
> > I found in source that there is file locks limit:
> >
> > int maxlocksperuid = 1024;
> > https://github.com/openbsd/src/blob/2452e2a8d7e9b5090ff527bcb559d0
> > 2899e5c6af/sys/kern/vfs_lockf.c
> >
> > Maybe this is a reason?
>
> Try
>
> sysctl kern.maxlocksperuid=2048
>
> -Otto
>
> >
> >
> > On Mon, Mar 5, 2018 at 12:10 PM, Stuart Henderson <s...@spacehopper.org>
> > wrote:
> >
> > > On 2018-03-05, Bambero <bamb...@gmail.com> wrote:
> > > > Hi,
> > > >
> > > > After move to OpenBSD 6.2 I have problem with MySQL. I looks like
> file
> > > > locks limit problem.
> > > > On fresh MySQL install, when try to restore dump, MySQL hangs
> restore at
> > > > 1500th table (each time). There are no other connections only my
> restore
> > > > commands which looks like this:
> > > >
> > > > for i in `ls`; do tab=`echo $i | rev | cut -c 5- | rev`; echo $tab;
> echo
> > > > 'CREATE DATABASE `'$tab'`' | mysql ; cat $i | mysql "$tab"; sleep 3;
> done
> > > >
> > > > Each database is restored separatelly.
> > > >
> > > > /var/mysql-error.log throws:
> > > >
> > > > 180304 17:32:00 [ERROR] InnoDB: Unable to lock ./tui_pap/class.ibd,
> > > error:
> > > > 77
> > > > 2018-03-04 17:32:00 63e1a24fa38  InnoDB: Operating system error
> number 77
> > > > in a file operation.
> > > > InnoDB: Error number 77 means 'No locks available'.
> > > > InnoDB: Some operating system error numbers are described at
> > > > InnoDB:
> > > > http://dev.mysql.com/doc/refman/5.6/en/operating-
> system-error-codes.html
> > > > 180304 17:32:00 [ERROR] InnoDB: Cannot create file
> './tui_pap/class.ibd'
> > > >
> > > > I found in man page https://man.openbsd.org/errno.2
> > > > 77 ENOLCK *No locks available*. A system-imposed limit on the number
> of
> > > > simultaneous file locks was reached.
> > > > So the quastion is what is the limit of file locks, and how to
> change it
> > > up?
> > > >
> > > > How can i check how many locks are currently made?
> > > >
> > > > Thanks for any help.
> > > >
> > > > Bambero
> > > >
> > >
> > > Not sure if locks are accounted separately, are you just running out of
> > > file descriptors? Did you follow the instructions in the pkg-readme?
> > >
> > >
> > >
>


Re: mariaDB - limits problem?

2018-03-05 Thread Bambero
Thanks for the answer.
This prblem is not related with open-files limit. This error is completly
different.
I have a special class in login.conf so open files limit we should exclude
in this case:

mysqld:\
<-->:openfiles-cur=1024:\
<-->:openfiles-max=2048:\
<-->:tc=daemon:

I found in source that there is file locks limit:

int maxlocksperuid = 1024;
https://github.com/openbsd/src/blob/2452e2a8d7e9b5090ff527bcb559d0
2899e5c6af/sys/kern/vfs_lockf.c

Maybe this is a reason?


On Mon, Mar 5, 2018 at 12:10 PM, Stuart Henderson <s...@spacehopper.org>
wrote:

> On 2018-03-05, Bambero <bamb...@gmail.com> wrote:
> > Hi,
> >
> > After move to OpenBSD 6.2 I have problem with MySQL. I looks like file
> > locks limit problem.
> > On fresh MySQL install, when try to restore dump, MySQL hangs restore at
> > 1500th table (each time). There are no other connections only my restore
> > commands which looks like this:
> >
> > for i in `ls`; do tab=`echo $i | rev | cut -c 5- | rev`; echo $tab; echo
> > 'CREATE DATABASE `'$tab'`' | mysql ; cat $i | mysql "$tab"; sleep 3; done
> >
> > Each database is restored separatelly.
> >
> > /var/mysql-error.log throws:
> >
> > 180304 17:32:00 [ERROR] InnoDB: Unable to lock ./tui_pap/class.ibd,
> error:
> > 77
> > 2018-03-04 17:32:00 63e1a24fa38  InnoDB: Operating system error number 77
> > in a file operation.
> > InnoDB: Error number 77 means 'No locks available'.
> > InnoDB: Some operating system error numbers are described at
> > InnoDB:
> > http://dev.mysql.com/doc/refman/5.6/en/operating-system-error-codes.html
> > 180304 17:32:00 [ERROR] InnoDB: Cannot create file './tui_pap/class.ibd'
> >
> > I found in man page https://man.openbsd.org/errno.2
> > 77 ENOLCK *No locks available*. A system-imposed limit on the number of
> > simultaneous file locks was reached.
> > So the quastion is what is the limit of file locks, and how to change it
> up?
> >
> > How can i check how many locks are currently made?
> >
> > Thanks for any help.
> >
> > Bambero
> >
>
> Not sure if locks are accounted separately, are you just running out of
> file descriptors? Did you follow the instructions in the pkg-readme?
>
>
>


mariaDB - limits problem?

2018-03-05 Thread Bambero
Hi,

After move to OpenBSD 6.2 I have problem with MySQL. I looks like file
locks limit problem.
On fresh MySQL install, when try to restore dump, MySQL hangs restore at
1500th table (each time). There are no other connections only my restore
commands which looks like this:

for i in `ls`; do tab=`echo $i | rev | cut -c 5- | rev`; echo $tab; echo
'CREATE DATABASE `'$tab'`' | mysql ; cat $i | mysql "$tab"; sleep 3; done

Each database is restored separatelly.

/var/mysql-error.log throws:

180304 17:32:00 [ERROR] InnoDB: Unable to lock ./tui_pap/class.ibd, error:
77
2018-03-04 17:32:00 63e1a24fa38  InnoDB: Operating system error number 77
in a file operation.
InnoDB: Error number 77 means 'No locks available'.
InnoDB: Some operating system error numbers are described at
InnoDB:
http://dev.mysql.com/doc/refman/5.6/en/operating-system-error-codes.html
180304 17:32:00 [ERROR] InnoDB: Cannot create file './tui_pap/class.ibd'

I found in man page https://man.openbsd.org/errno.2
77 ENOLCK *No locks available*. A system-imposed limit on the number of
simultaneous file locks was reached.
So the quastion is what is the limit of file locks, and how to change it up?

How can i check how many locks are currently made?

Thanks for any help.

Bambero


openfiles limit

2016-08-23 Thread Bambero
Hi,

Some question about openfiles limit...

I can't understand how openbsd counts open files.

Ex.

# sysctl kern.nfiles ; fstat | wc -l
kern.nfiles=2470
3594

What's the difference between kern.nfiles and fstat?

Secondly, I set class limits for mysql for testing:

# rcctl get mysqld
mysqld_class=mysqld
mysqld_flags=
mysqld_timeout=30
mysqld_user=root

# userinfo _mysql
login   _mysql
passwd  *
uid 502
groups  _mysql
change  NEVER
class   mysqld
gecos   MySQL Account
dir /nonexistent
shell   /sbin/nologin
expire  NEVER

# getcap -f /etc/login.conf mysqld
mysqld: :openfiles-cur=128: :openfiles-max=256:

# su _mysql
# ulimit -a
time(cpu-seconds)unlimited
file(blocks) unlimited
coredump(blocks) unlimited
data(kbytes) 33554432
stack(kbytes)8192
lockedmem(kbytes)10825182
memory(kbytes)   32472388
nofiles(descriptors) 128
processes1310

So why mysql is allowed to open more than 256 files:

# fstat -u _mysql | wc -l
 998

Can anyone help with that?

# uname -a
OpenBSD zeus.apisoft.pl 5.9 GENERIC.MP#1888 amd64

Regards,
Bambero



rescue booting system by cdrom bootloader

2016-04-13 Thread Bambero
Hi

Now I'm booting from cdrom and using command:

boot hd0a:/bsd

and it works, but root filesystem is readonly.

How to make it rw?

Regards
Bambero



LDAPD attribute and ACL'S

2014-07-25 Thread Bambero
Hi

Is it possibile to give write access only for userPassword field ?

sth like:

allow write access to attr=userPassword by self

Regards
Bambero



setgid problem

2013-10-09 Thread Bambero
Hello

I have a small php script which creates a file:


#!/usr/local/bin/php-5.2 -q

//set group ID to operator
posix_setgid(5);
posix_setegid(5);

//set user ID to nobody
posix_setuid($_uid);

// create file
touch('/tmp/permtest');

echo 'getuid: ' . posix_getuid() . \n;
echo 'getgid: ' . posix_getgid() . \n;
echo 'getegid: ' . posix_getegid() . \n;


Script returns (as expected):
--
getuid: 2
getgid: 5
getegid: 5
--

But file created with that script has perms:

-rw-r--r--   1 operator wheel 0 Oct  9 16:16 permtest

So it looks like the setgid not works ?

Can anyone help ?

Bambero



Re: setgid problem

2013-10-09 Thread Bambero
Thanks fo the answer.

But, another example:

#!/usr/local/bin/php-5.2 -q

//set group ID to operator
posix_setgid(5);
posix_setegid(5);

//set user ID to nobody
posix_setuid($_uid);

echo 'getuid: ' . posix_getuid() . \n;
echo 'getgid: ' . posix_getgid() . \n;
echo 'getegid: ' . posix_getegid() . \n;

echo file_get_contents('/etc/sudoers');


This script returns contents of /etc/sudoers file.
But it shouldn't becouse perms of /etc/sudoers permissions are:
-
-r--r-  1 root  wheel  1354 Aug 17  2011 /etc/sudoers


I'm I right ?

Bambero


On Wed, Oct 9, 2013 at 4:30 PM, Otto Moerbeek o...@drijf.net wrote:

 On Wed, Oct 09, 2013 at 04:26:20PM +0200, Bambero wrote:

  Hello
 
  I have a small php script which creates a file:
 
  
  #!/usr/local/bin/php-5.2 -q
 
  //set group ID to operator
  posix_setgid(5);
  posix_setegid(5);
 
  //set user ID to nobody
  posix_setuid($_uid);
 
  // create file
  touch('/tmp/permtest');
 
  echo 'getuid: ' . posix_getuid() . \n;
  echo 'getgid: ' . posix_getgid() . \n;
  echo 'getegid: ' . posix_getegid() . \n;
  
 
  Script returns (as expected):
  --
  getuid: 2
  getgid: 5
  getegid: 5
  --
 
  But file created with that script has perms:
 
  -rw-r--r--   1 operator wheel 0 Oct  9 16:16 permtest
 
  So it looks like the setgid not works ?
 
  Can anyone help ?
 
  Bambero

 On *BSD systems, the group owner of a file is inherited from the directory.

 -Otto



Re: Copy root partition to another machine

2011-11-06 Thread Bambero
Thanks, but without skip=1 dd will copy partition table and mbr too
(first block 521b).
So it may damage my partition table on second machine. I'm I wrong ?

On Fri, Nov 4, 2011 at 6:25 PM, Marc Smith marc_sm...@gmx.com wrote:
 dd if=/dev/wd0a of=root.img bs=32m [or compress it using: dd
 if=/dev/wd0a bs=32m | gzip  root.img.gz]

 and

 dd if=root.img of=/dev/wd0a bs=32m [decompression: gzip -d -c
 root.img.gz | dd of=/dev/wd0a bs=32m]

 And yes, you can ommit additional values.

 Dnia piD , 4 lis 2011, 17:43:28 Bambero pisze:
 Hello

 I want to copy my root partition to another with dd without ssh. Is
 this correct:

 1. On first machine:
 dd if=/dev/rwd0a of=root.img bs=16b skip=1 conv=noerror

 2. On second machine:
 dd if=root.img of=/dev/rwd0a bs=16b seek=1

 May/should I ommit seek, skip, conv, bs  parameters ?

 Regards,
 Bambero



Copy root partition to another machine

2011-11-04 Thread Bambero
Hello

I want to copy my root partition to another with dd without ssh. Is
this correct:

1. On first machine:
dd if=/dev/rwd0a of=root.img bs=16b skip=1 conv=noerror

2. On second machine:
dd if=root.img of=/dev/rwd0a bs=16b seek=1

May/should I ommit seek, skip, conv, bs  parameters ?

Regards,
Bambero



Zend Guard Loader

2011-11-02 Thread Bambero
Hello,

After upgrade PHP to 5.3 I have problems with Zend Encoder.
Zend Optimizer works fine with php 5.2 but since php 5.3 there is Zend
Guard Loader and there is no version for *BSD.
So maybe there is a way to convert this extension to OpenBSD compatible ?
I read about linux.compat, elf2olf etc. but I'm not a C programmer, so
please help.

Under linux ldd returns:
ldd ZendGuardLoader.so
linux-gate.so.1 =  (0xb781e000)
libdl.so.2 = /lib/libdl.so.2 (0xb771a000)
libm.so.6 = /lib/libm.so.6 (0xb76f)
libc.so.6 = /lib/libc.so.6 (0xb7574000)
/lib/ld-linux.so.2 (0xb781f000)

Under OpenBSD::
ldd /home/admin/ZendGuardLoader.so
/home/admin/ZendGuardLoader.so:
Cannot load specified object

Thanks for any help.
Regards,
Bambero



httpd virtualhost ip

2011-06-12 Thread Bambero
Hello

I have many IP and IP based virtualhost configured.

My hostname.em0 looks like this:
inet 123.456.789.66 255.255.255.224
inet alias 123.456.789.67 255.255.255.224
inet alias 123.456.789.68 255.255.255.224
inet alias 123.456.789.70 255.255.255.224
inet alias 123.456.789.71 255.255.255.224
...

My virtualhost part in httpd.conf:
VirtualHost 123.456.789.70:80
...
/VirtualHost

VirtualHost 123.456.789.71:80
...
/VirtualHost
...

Everything works fine. But when making request (for ex. fsockopen)
with php the outgoing IP is 123.456.789.66.
Does anybody know how to tell php to bind to virualhost IP when making request ?

Regards
Bambero



OpenBSD 4.8

2010-09-15 Thread Bambero
Hi,

I'd like to know, is OpenBSD 4.8 ready now ?
Release date is 01-11-2010 but maybe it's possible to have it now
using preorders.
I have to change datacenter in next week, so it's best time to upgrade.

Thanks,
Bambero



Re: OpenBSD 4.8

2010-09-15 Thread Bambero
Yes, it seems to be the best way.

Does anyone know that may I use 4.7 instalation CD to install 4.8 sets ?

On Wed, Sep 15, 2010 at 1:40 PM, Dunceor dunc...@gmail.com wrote:
 On Wed, Sep 15, 2010 at 1:23 PM, Bambero bamb...@gmail.com wrote:
 Hi,

 I'd like to know, is OpenBSD 4.8 ready now ?
 Release date is 01-11-2010 but maybe it's possible to have it now
 using preorders.
 I have to change datacenter in next week, so it's best time to upgrade.

 Thanks,
 Bambero



 The code is in cvs, just download it and build yourself.



softraid

2010-06-04 Thread Bambero
Hello,

My qastion is - is it possible to setup bootable software raid 1
(mirroring) during system install ?

After boot from a install cd  I choose Shell, than I made one
partition on whole disk wd0 and wd1
and made a raid volume:
bioctl -c 1 -l /dev/wd1a,/dev/wd0a,/dev/wd1a softraid0

then I installed the system on newly created sd0 device

Everything went OK but system doesn't boot after reboot.

What I missed ?

Regards,
Bambero



SSH chroot and ForceCommand

2010-03-19 Thread Bambero
I have a liitle problem.

I need a sshd configuration to chroot (internal sftp) every user
excluding admin (which should have a shell access).

So i made:

ChrootDirectory /var/www/users/%u
ForceCommand internal-sftp
X11Forwarding no
AllowTcpForwarding no

Match User admin
ChrootDirectory none
ForceCommand no

I also tried to set ForceCommand to SSH_ORIGINAL_COMMAND or none or true
or leave emty. Doesn't work.

I also try different configuration:

Match User !admin
ChrootDirectory /var/www/users/%u
ForceCommand internal-sftp
X11Forwarding no
AllowTcpForwarding no

but it doesnt work too.

I don't want to set special group (ex. sftopnly) for users.
Is there a better way ?

Thanks,
Bambero



mod_ldapvhost

2010-02-18 Thread Bambero
Hello

I have a problem with mod_ldapvhost. It won't resolve hosts. I still
have DocumentRoot from httpd.conf. Does it require any aditional
configuration ? I'm sure that connection between apache and openldap is
estabilished poperly.

Maybe someone have an example ldif file to test.

Unfortunatelly there is no documentation for mod_ldapvhost.

Thanks for any help,
Bambero



Re: mod_ldapvhost

2010-02-18 Thread Bambero
This is not DNS related. Maybe I should write:

Apache can't see virtualhosts in LDAP.

On Thu, Feb 18, 2010 at 8:45 PM, Bret S. Lambert bret.lamb...@gmail.com wrote:
 On Thu, Feb 18, 2010 at 08:23:08PM +0100, Bambero wrote:
 Hello

 I have a problem with mod_ldapvhost. It won't resolve hosts. I still
 have DocumentRoot from httpd.conf. Does it require any aditional
 configuration ? I'm sure that connection between apache and openldap is
 estabilished poperly.

 You likely need to work out how to get /etc/resolv.conf inside
 your http chroot.

 This has been discussed enough on the list that you shouldn't have
 any trouble figuring out how to shoehorn most anything, up to and
 including a working Windows7 install, into the chroot environment.


 Maybe someone have an example ldif file to test.

 Unfortunatelly there is no documentation for mod_ldapvhost.

 Thanks for any help,
 Bambero



powerdns port

2009-06-22 Thread Bambero
Hi,

It seems there is no ldap backend for powerdns. Does anyone know why ?

Bambero



APACHE source modification

2008-01-27 Thread Bambero
Hello

I have modified apache source in /usr/src/usr.sbin/httpd.
What commands should I use to build it to override my current binary
instalation ?

./configure  make  make install

will be good ?

Regards,
Bambero

-- 
Bambero [EMAIL PROTECTED]



Re: APACHE source modification

2008-01-27 Thread Bambero
On Sun, 27 Jan 2008 08:36:22 -0500
Josh Grosse [EMAIL PROTECTED] wrote:

 On Sun, Jan 27, 2008 at 02:12:38PM +0100, Bambero wrote:
  Hello
  
  I have modified apache source in /usr/src/usr.sbin/httpd.
  What commands should I use to build it to override my current binary
  instalation ?
 
 FAQ 5.3.5 will work.  Of course, afterwards, your browser may not.

Read post carefully. As i suppose apache is specific package, there is
no Makefile like in others packages, so reding FAQ 5.3.5 doesn't help.

I used the following command but I'm not sure it's correct
cd /usr/src/usr.sbin/httpd
make -f Makefile.bsd-wrapper install

-- 
Bambero [EMAIL PROTECTED]



System limits

2007-12-21 Thread Bambero
Hello

I have a problem with system limis (max_open_files, semaphors, etc).
By default this settings are very restrictive, and I want to change
them. So can anyone help me with that ?
I'm running small hosting system with apache and ftp access (200
accounts), and mail server courier-mta with spamassasin, and clamav.

Which options should I change ?

Thanks for any help.

Regards,
Bambero



Securing apache

2007-12-17 Thread Bambero
Hello

I have a problem with apache configuration.  I have a small hosting
server and I want that users
will be able to change some settings of PHP using .htaccess (php_flag).
So I have to set:

AllowOverride Options

I also want that users will be able to set their own error documents.
So I have to set:

AllowOverride Options FileInfo

And now users have almost full configuration. For ex. they are able to
enable CGI - what I don't want to they do.

Options +ExecCGI
AddHandler cgi-script cgi pl

So does anyone know how to solve that without giving full privilleges ?
Maybe there is a module which may help me ?

Regards
Bambero



mc problem under 4.2

2007-11-27 Thread Bambero
Hello

I have a strange problem with mc (MidnightCommander).
After install OpenBSD 4.2 mc doesn't work properly.
When i type:

mc

I have to wait 5 min to see the Midnight Commander. After comannd it
hangs and it's ready to work after 5 minutes.
It doesnt matter I use bsd or bsd.mp kernel. It doesn't matter which
terminal I use.
I tried to instal mc using ports but it won't help. There is no
problem with other software.

Thanks for any help

Regards,
Bambero



Re: mc problem under 4.2

2007-11-27 Thread Bambero
On Nov 27, 2007 8:25 PM, Jack J. Woehr [EMAIL PROTECTED] wrote:
 On Nov 27, 2007, at 12:02 PM, Bambero wrote:

 
  When i type:
 
  mc
 
  I have to wait 5 min to see the Midnight Commander. After comannd it
  hangs and it's ready to work after 5 minutes.

 [[ This probably should have been reported to ports@ rather than
 misc@ ]]

 Bambero, I'm an 'mc' fanatic running it under 4.2. There is no problem
 for me.

 My wild analytical guess about your problem is this:

 One of the two panes of the mc display is logged into some remote
 device or file system -- nfs, ftp, unmounted disk, etc. Something.
 And that file system is not active so mc tries after each command
 until it times out.

 Was that a good guess?


Hmm the problem is not so simple i have second machine with OpenBSD
4.2 and everything works fine.
Secondly when i chroot to this instalation under OpenBSD 4.0 it works
without any problems.
Maybe something with my hardware, but under OpenBSD 4.0 it works fine
on the same computer.

 --
 Jack J. Woehr
 Director of Development
 Absolute Performance, Inc.
 [EMAIL PROTECTED]
 303-443-7000 ext. 527



Re: mc problem under 4.2

2007-11-27 Thread Bambero
On Nov 27, 2007 8:24 PM, Jeff Quast [EMAIL PROTECTED] wrote:
 On Tue, Nov 27, 2007 at 08:02:46PM +0100, Bambero wrote:
  Hello
 
  I have a strange problem with mc (MidnightCommander).
  After install OpenBSD 4.2 mc doesn't work properly.

 fresh install or upgrade from say, 4.1?


Yes it's fresh install.

  When i type:
 
  mc
 
  I have to wait 5 min to see the Midnight Commander. After comannd it
  hangs and it's ready to work after 5 minutes.
  It doesnt matter I use bsd or bsd.mp kernel. It doesn't matter which
  terminal I use.
  I tried to instal mc using ports but it won't help.

 You built mc from source? used a binary package? stale package from before
 the upgrade?


I used binary package and package built from source using ports.

 This feels like a dns resolution issue, maybe a missing entry in /etc/hosts

 if you just did an upgrade, maybe you blew away your hosts or resolv.conf ?

 I don't use mc, but doesn't it do some sort of ftp or remote file
 transfer, and may like to know its' hostname/address? Does it maybe
 take long to ping $(hostname)?

 you can use ktrace(1) to examine what mc is busy waiting for from
 the system, if thats the case.


Yes I have to do some tests



Re: mc problem under 4.2

2007-11-27 Thread Bambero
On Nov 27, 2007 8:24 PM, Jeff Quast [EMAIL PROTECTED] wrote:
 On Tue, Nov 27, 2007 at 08:02:46PM +0100, Bambero wrote:
  Hello
 
  I have a strange problem with mc (MidnightCommander).
  After install OpenBSD 4.2 mc doesn't work properly.

 fresh install or upgrade from say, 4.1?

  When i type:
 
  mc
 
  I have to wait 5 min to see the Midnight Commander. After comannd it
  hangs and it's ready to work after 5 minutes.
  It doesnt matter I use bsd or bsd.mp kernel. It doesn't matter which
  terminal I use.
  I tried to instal mc using ports but it won't help.

 You built mc from source? used a binary package? stale package from before
 the upgrade?

 This feels like a dns resolution issue, maybe a missing entry in /etc/hosts

 if you just did an upgrade, maybe you blew away your hosts or resolv.conf ?

 I don't use mc, but doesn't it do some sort of ftp or remote file
 transfer, and may like to know its' hostname/address? Does it maybe
 take long to ping $(hostname)?

 you can use ktrace(1) to examine what mc is busy waiting for from
 the system, if thats the case.


Exactly, it was dns. Naow everything works perfectly.

Thanks



OpenBSD and USB printer

2007-06-10 Thread Bambero

Hello

I have problem to configure USB printer (CANON ip4200) using cups.
Here are some outputs:

# usbdevs
addr 1: UHCI root hub, Intel
addr 1: UHCI root hub, Intel
addr 1: UHCI root hub, Intel
addr 1: UHCI root hub, Intel
addr 1: EHCI root hub, Intel
addr 2: iP4200, Canon

dmesg

ulpt0 at uhub4 port 7 configuration 1 interface 0
ulpt0: Canon iP4200, rev 2.00/1.09, addr 2, iclass 7/1
ulpt0: using bi-directional mode
...

when starting cups returns following messages:

I [10/Jun/2007:20:56:17 +0200] Listening to 0:631
I [10/Jun/2007:20:56:17 +0200] Loaded configuration file /etc/cups/cupsd.conf
I [10/Jun/2007:20:56:17 +0200] Configured for up to 100 clients.
I [10/Jun/2007:20:56:17 +0200] Allowing up to 100 client connections per host.
I [10/Jun/2007:20:56:17 +0200] Full reload is required.
W [10/Jun/2007:20:56:47 +0200] LoadDevices: Backend did not respond
within 30 seconds!
I [10/Jun/2007:20:56:49 +0200] LoadPPDs: Read /etc/cups/ppds.dat, 13 PPDs...
I [10/Jun/2007:20:56:49 +0200] LoadPPDs: No new or changed PPDs...
I [10/Jun/2007:20:56:49 +0200] Full reload complete.

What may be wrong ?

Regards
Bambero



two wan interfaces

2007-05-25 Thread Bambero

Hello

I have a problem to setup two interfaces to be accessible from internet.

I found some informations, and now I know that I shouldn't set default
gateway, but I should setup routing rules using pf.

I don't need load balance, or nat. I just need two accessible from
internet interfaces.

When the request goes to first interface it should back via first interface.
When the request goes to second interface it should back via second interface.

Please forgive me my broken english.

Thanks for any help.
Bambero



log rotation

2007-05-15 Thread Bambero

Hello

I'm wondering how to implement log rotation with chrooted apache.

Anyone solved this problem ?

Thanks
Bambero



PHP PDO drivers

2006-12-30 Thread Bambero

Hello

I can't see php pdo drivers in packages respository but pdo i
available. Anyone know how to install pdo_drivers ?

Regards
Bambero



port forwarding

2006-12-04 Thread Bambero

Hello

I have a problem with port forwarding. My network looks like this:

INERNET   =  [ne3] router (OpenBSD-3.9) [ne4] (192.168.0.1)  =
client (192.168.0.2)

I want to forward port  of my router [ne3] to port 80 on client machine.
I have the following rules in my /etc/pf.conf:

===
ext_if=ne3
int_if=ne4

nat on $ext_if from !($ext_if) - ($ext_if)

rdr pass proto tcp from any to any port  -  port 80
===

When i try to connect (using telnet) to port  connection hangs. Nmap shows:

/tcp filtered sun-answerbook

Otherway when I try to forward port  to machine with public IP
evething works fine:

rdr pass proto tcp from any to any port  - 129.128.5.191 port 80

/tcp open sun-answerbook


Port 80 on 192.168.0.2 is open.

What may be wrong ?

Regards,
Bambero



Re: port forwarding

2006-12-04 Thread Bambero

On 12/4/06, Marcus Popp [EMAIL PROTECTED] wrote:

On 2006-12-04T14:50, Bambero wrote:
...
 rdr pass proto tcp from any to any port  -  port 80
...


This line really looks like this:

rdr pass proto tcp from any to any port  -  192.168.0.2 port 80

Don't know why I didn't copy IP in previous email.



Changing apache uid for VirtualHost's

2006-11-11 Thread Bambero

Hello

I have a little problem with www user accounts.
I have quota settings for each user, but when users upload files on
the server (using php scripts) quota is unusable becouse files owner
is www. The best solution for will something like suexec (different
uid for each VirtualHost), but I'm not sure it will works with php.
Secondly I'm using chrooted apache.
Any solutions ?

Regards
Bambero



Re: blobs are bad

2006-10-18 Thread Bambero

open source community answer:

http://www.petitiononline.com/nvfoss/petition.html

On 10/18/06, Theo de Raadt [EMAIL PROTECTED] wrote:

http://news.com.com/Exploit+code+released+for+Nvidia+flaw/2100-1002_3-6126846.html

I just wanted to say... Told you so.

Quite amusing.

Of course we know this is not the last time this will happen.

More problems like this will be exposed, and it is my hope that
vendors who refuse to participate in the open communities will get
punished more firmly than open vendors.  I also hope that their
embedded^Husers feel the pain, so that one day they will stand beside
us when we ask for open documentaion.




overwritten file recovery - how ?

2006-09-30 Thread Bambero

Hello

I need to recovery overwritten txt file.

Ex.
echo my data  testfile.txt
echo   testfile.txt

I have partition image file creted using dd.
Is it possible to dump it and search using grep for example ?
Is it possible to recover overwritten data ?

Thanks
Bambero



Re: overwritten file recovery - how ?

2006-09-30 Thread Bambero

On 9/30/06, Paul Stoeber [EMAIL PROTECTED] wrote:

On Sat, 30 Sep 2006 19:24:43 +0200 Bambero [EMAIL PROTECTED] wrote:
 Hello

 I need to recovery overwritten txt file.

 Ex.
 echo my data  testfile.txt
 echo   testfile.txt

 I have partition image file creted using dd.
 Is it possible to dump it and search using grep for example ?
 Is it possible to recover overwritten data ?

 Thanks
 Bambero

I've had luck with
tr '\0' '\n'  disk | grep -C1000 KEYWORD  /mnt/safe


what is disk in this example ?



Re: chrooted sftponly - how ?

2006-09-19 Thread Bambero

On 9/18/06, Simon Slaytor [EMAIL PROTECTED] wrote:

I'm sure the people behind

http://chrootssh.sourceforge.net/index.php

would argue about it being impossible.

Before I saw the light and went OpenBSD I used these patches on an FC1
box and it worked like a charm, doing exactly what your after.

I've not tried to replace the OpenSSH install on OpenBSD with a patched
version always assuming it would break horribly.


Ofcourse patching is not right solution.



If you get it working let me know as I'd love to be able to chroot
SSH/SFTP again.



In my opinion the best and the most secure way is setup rssh. But
there are two problems. BSD systems are not supported and program wont
compile becouse of missing wordexp() function. Secondly sftp-server
requires /dev/null device in chrooted environment so you cannot mount
/home partition as nodev.



Bambero wrote:
 You can create a systrace policy for a sshd instance dedicated to sftp
 service

 This sems to be better way.
 Whatever, it will be nice to have builtin chroot in sftp-sever. Such
 in ftpd. But I suppose it's technicaly impossible.

 Thanks for help
 Bambero




chrooted sftponly - how ?

2006-09-18 Thread Bambero

Hello

Is there any good way to setup chrooted sftp-server without shell access ?

I tried scponly but it's not secure enough (I heard), there is no port
for openbsd,
and I had problems to set it up.

Second way is rssh, but compilation fails becouse of worexp.

Now I'm using ftpd but I want to change it becouse of text/plain passwords.

Any suggestions ?

Bambero



Re: chrooted sftponly - how ?

2006-09-18 Thread Bambero

Seems to work fine but it's still not chrooted environment. Users have
access to a whole system.

On 9/18/06, Francois Visconte [EMAIL PROTECTED] wrote:

Hello,
Try changing sftp-only user's shell to /usr/libexec/sftp-server

Cheers,
Frangois Visconte

Bambero wrote:

 Hello

 Is there any good way to setup chrooted sftp-server without shell
 access ?

 I tried scponly but it's not secure enough (I heard), there is no port
 for openbsd,
 and I had problems to set it up.

 Second way is rssh, but compilation fails becouse of worexp.

 Now I'm using ftpd but I want to change it becouse of text/plain
 passwords.

 Any suggestions ?

 Bambero




Re: chrooted sftponly - how ?

2006-09-18 Thread Bambero

On 9/18/06, Francois Visconte [EMAIL PROTECTED] wrote:

Hello,

You can create a chrooted environment for another ssh server:
 1/ ldd sshd and sftp-server binaries and copy dependencies
 2/ copy
/etc/{group,hosts,passwd,protocols,pwd.db,resolv.conf,services,ttys} and
/bin/{cat,pwd,rm,sh} into your chroot
 3/ modify /etc/ files to change users groups ...
 3bis/ run pwd_mkdb(8) with appropriate options to regenerate password
db into your chrooted env
 4/ create devices /dev/{log,null,random,...} in your chrooted env
 5/ configure your ssh server to listen on another port than 22 if there
is already one on this machine
 6/ put chroot /my_chroot /usr/sbin/sshd in your rc.local
 7/ make a script to apply userland upgrades to your chroot env



For each user ? Noo it's not for me.


...Or
You can create a systrace policy for a sshd instance dedicated to sftp
service



This sems to be better way.
Whatever, it will be nice to have builtin chroot in sftp-sever. Such
in ftpd. But I suppose it's technicaly impossible.

Thanks for help
Bambero



Cheers,
Frangois Visconte
Bambero wrote:

 Seems to work fine but it's still not chrooted environment. Users have
 access to a whole system.

 On 9/18/06, Francois Visconte [EMAIL PROTECTED] wrote:

 Hello,
 Try changing sftp-only user's shell to /usr/libexec/sftp-server

 Cheers,
 Frangois Visconte

 Bambero wrote:

  Hello
 
  Is there any good way to setup chrooted sftp-server without shell
  access ?
 
  I tried scponly but it's not secure enough (I heard), there is no port
  for openbsd,
  and I had problems to set it up.
 
  Second way is rssh, but compilation fails becouse of worexp.
 
  Now I'm using ftpd but I want to change it becouse of text/plain
  passwords.
 
  Any suggestions ?
 
  Bambero