On Sun, 13 Aug 2000, Dmitry Morozovsky wrote:

���������� ���� ���� - ������ ������.

> IK> ���� ������ ���� ������� �� ����, ���������, �� �ţ ���� �������
> IK> ���������� (� ��� ��� �� ������� �� ������� �����), ��
> IK> �������� �� SO_REUSEADDR, ţ ��� ���������� ����� ��������� �� �����
> IK> ������� ������������. ������� � ��������� ��������, ����� �����
> IK> reconfigure oops �� ����� ����������� �� ���� ����������� � ����������
> IK> ����� ������.
> 
> �������. � �������, �� ���� ������� ���� � �� ��, ������ ��� ��� 3.� -- �
> ���� ��� ��������, � ������ �� ����� �������� � �� �����������.
> 
> � ��� ������ ��� ������������� ������������ �� �������������� ���� �
> ������ �� ��������� � ���� -- ��� ��������� ������...
> 
> ������, ��� ��� ������: ��� �� ������� �������� ����������� oops'�,
> ������� ����� ���������� ��� ���������, ��� ���������� ������������? � ���
> ��� �������?
> 
> IK> ������-�� ��� �������� �� ������� FreeBSD.
> 
> �, ���, ���� ����� �� ��� ����? ;)))
> 
> Sincerely,
> D.Marck                                   [DM5020, DM268-RIPE, DM3-RIPN]
> ------------------------------------------------------------------------
> *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- [EMAIL PROTECTED] ***
> ------------------------------------------------------------------------
> 
> =====================================================================
> If you would like to unsubscribe from this list send message to
> [EMAIL PROTECTED] with "unsubscribe oops" in message body.
> Archive is accessible on http://www.paco.net/oops/
> 

Igor Khasilev                |
PACO Links, [EMAIL PROTECTED]    |
Index: modules.c
===================================================================
RCS file: /usr/local/cvs/oops/src/modules.c,v
retrieving revision 1.19
diff -c -r1.19 modules.c
*** modules.c   2000/07/27 13:25:09     1.19
--- modules.c   2000/08/16 07:52:48
***************
*** 717,722 ****
--- 717,734 ----
            pptr->so = so;
            pptr++;
        } else
+ #if   defined(FREEBSD)
+       /*
+        * sockets in freebsd have 'owner' (at least in 4.0)
+        * and any furrher binds will fail regardless of SO_REUSEADDR 
+        * if we will bind from different user (of course if there is
+        * socket in WAIT_TIME and such in system pcb list)
+        * we can ignore this for reserved ports as we use different
+        * method for binding reserved ports.
+        */
+       if ( oops_user && (port >= IPPORT_RESERVED) )
+           set_euser(oops_user);
+ #endif
        if ( port && (so = socket(AF_INET, SOCK_STREAM, 0)) >= 0 ) {
            setsockopt(so, SOL_SOCKET, SO_REUSEADDR, (char*)&one, sizeof(one));
            sin_addr.sin_family = AF_INET;
***************
*** 734,743 ****
                listen(so, 128);
                pptr++;
            } else {
!               verb_printf("parse_myports: bind: %m\n");
            }
            printf("port = %d\n", port);
        }
      }
      return(nres);
  }
--- 746,760 ----
                listen(so, 128);
                pptr++;
            } else {
!               verb_printf("parse_myports(): bind: %s\n", strerror(errno));
!               my_xlog(LOG_SEVERE, "parse_myports(): bind: %m\n");
            }
            printf("port = %d\n", port);
        }
+ #if   defined(FREEBSD)
+       if ( oops_user && (port >= IPPORT_RESERVED) )
+           set_euser(NULL);
+ #endif
      }
      return(nres);
  }

Дати відповідь електронним листом