Hello community, here is the log from the commit of package resmgr checked in at Fri Aug 3 02:26:57 CEST 2007. -------- --- resmgr/resmgr.changes 2007-06-11 17:37:30.000000000 +0200 +++ /mounts/work_src_done/STABLE/resmgr/resmgr.changes 2007-08-02 11:14:52.000000000 +0200 @@ -1,0 +2,5 @@ +Thu Aug 2 11:14:45 CEST 2007 - lnussel@suse.de + +- support user and group names of arbitrary length (#294530) + +------------------------------------------------------------------- Old: ---- resmgr-1.1.0_SVNr139.tar.bz2 New: ---- resmgr-1.1.0_SVNr143.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ resmgr.spec ++++++ --- /var/tmp/diff_new_pack.q12509/_old 2007-08-03 02:24:33.000000000 +0200 +++ /var/tmp/diff_new_pack.q12509/_new 2007-08-03 02:24:33.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package resmgr (Version 1.1.0_SVNr139) +# spec file for package resmgr (Version 1.1.0_SVNr143) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -12,15 +12,16 @@ Name: resmgr BuildRequires: coreutils pam-devel -License: GNU General Public License (GPL) +License: GPL v2 or later Group: System/Daemons -Version: 1.1.0_SVNr139 +Version: 1.1.0_SVNr143 Release: 1 Summary: A program to track when users log in and out Source: resmgr-%{version}.tar.bz2 Source1: resmgr.init Source2: resmgr-doc.desktop BuildRoot: %{_tmppath}/%{name}-%{version}-build +Provides: resmgr-devel # if you know a better way for that provides feel free to fix it %ifarch x86_64 ia64 s390x ppc64 Provides: libresmgr.so.0.9.8()(64bit) @@ -120,6 +121,8 @@ %dir /var/run/resmgr/classes %changelog +* Thu Aug 02 2007 - lnussel@suse.de +- support user and group names of arbitrary length (#294530) * Mon Jun 11 2007 - lnussel@suse.de - remove references to usbraw hack from docu (#250659) - update usb example to use new usb_device properties ++++++ resmgr-1.1.0_SVNr139.tar.bz2 -> resmgr-1.1.0_SVNr143.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/resmgr-1.1.0_SVNr139/configure new/resmgr-1.1.0_SVNr143/configure --- old/resmgr-1.1.0_SVNr139/configure 2007-06-11 17:31:19.000000000 +0200 +++ new/resmgr-1.1.0_SVNr143/configure 2007-08-02 11:13:30.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.60 for resmgr 1.1.0_SVNr139. +# Generated by GNU Autoconf 2.60 for resmgr 1.1.0_SVNr143. # # Report bugs to http://forge.novell.com/modules/xfmod/project/?resmgr. # @@ -559,8 +559,8 @@ # Identity of this package. PACKAGE_NAME='resmgr' PACKAGE_TARNAME='resmgr' -PACKAGE_VERSION='1.1.0_SVNr139' -PACKAGE_STRING='resmgr 1.1.0_SVNr139' +PACKAGE_VERSION='1.1.0_SVNr143' +PACKAGE_STRING='resmgr 1.1.0_SVNr143' PACKAGE_BUGREPORT='http://forge.novell.com/modules/xfmod/project/?resmgr' ac_unique_file="src/resmgr.c" @@ -1203,7 +1203,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures resmgr 1.1.0_SVNr139 to adapt to many kinds of systems. +\`configure' configures resmgr 1.1.0_SVNr143 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1269,7 +1269,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of resmgr 1.1.0_SVNr139:";; + short | recursive ) echo "Configuration of resmgr 1.1.0_SVNr143:";; esac cat <<\_ACEOF @@ -1363,7 +1363,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -resmgr configure 1.1.0_SVNr139 +resmgr configure 1.1.0_SVNr143 generated by GNU Autoconf 2.60 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1377,7 +1377,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by resmgr $as_me 1.1.0_SVNr139, which was +It was created by resmgr $as_me 1.1.0_SVNr143, which was generated by GNU Autoconf 2.60. Invocation command line was $ $0 $@ @@ -2050,7 +2050,7 @@ # Define the identity of the package. PACKAGE='resmgr' - VERSION='1.1.0_SVNr139' + VERSION='1.1.0_SVNr143' cat >>confdefs.h <<_ACEOF @@ -5173,7 +5173,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by resmgr $as_me 1.1.0_SVNr139, which was +This file was extended by resmgr $as_me 1.1.0_SVNr143, which was generated by GNU Autoconf 2.60. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5220,7 +5220,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -resmgr config.status 1.1.0_SVNr139 +resmgr config.status 1.1.0_SVNr143 configured by $0, generated by GNU Autoconf 2.60, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/resmgr-1.1.0_SVNr139/doc/xml/pam_resmgr.8 new/resmgr-1.1.0_SVNr143/doc/xml/pam_resmgr.8 --- old/resmgr-1.1.0_SVNr139/doc/xml/pam_resmgr.8 2007-01-25 11:23:31.000000000 +0100 +++ new/resmgr-1.1.0_SVNr143/doc/xml/pam_resmgr.8 2007-08-02 10:54:11.000000000 +0200 @@ -1,11 +1,11 @@ .\" Title: pam_resgmr .\" Author: .\" Generator: DocBook XSL Stylesheets v1.71.1 http://docbook.sf.net/ -.\" Date: 01/25/2007 +.\" Date: 08/02/2007 .\" Manual: .\" Source: .\" -.TH "PAM_RESGMR" "8" "01/25/2007" "" "" +.TH "PAM_RESGMR" "8" "08/02/2007" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/resmgr-1.1.0_SVNr139/doc/xml/resmgr.1 new/resmgr-1.1.0_SVNr143/doc/xml/resmgr.1 --- old/resmgr-1.1.0_SVNr139/doc/xml/resmgr.1 2007-01-25 11:23:29.000000000 +0100 +++ new/resmgr-1.1.0_SVNr143/doc/xml/resmgr.1 2007-08-02 10:54:09.000000000 +0200 @@ -1,11 +1,11 @@ .\" Title: resmgr .\" Author: .\" Generator: DocBook XSL Stylesheets v1.71.1 http://docbook.sf.net/ -.\" Date: 01/25/2007 +.\" Date: 08/02/2007 .\" Manual: .\" Source: .\" -.TH "RESMGR" "1" "01/25/2007" "" "" +.TH "RESMGR" "1" "08/02/2007" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/resmgr-1.1.0_SVNr139/doc/xml/resmgr.conf.5 new/resmgr-1.1.0_SVNr143/doc/xml/resmgr.conf.5 --- old/resmgr-1.1.0_SVNr139/doc/xml/resmgr.conf.5 2007-01-25 11:23:27.000000000 +0100 +++ new/resmgr-1.1.0_SVNr143/doc/xml/resmgr.conf.5 2007-08-02 10:54:07.000000000 +0200 @@ -1,11 +1,11 @@ .\" Title: resmgr.conf .\" Author: .\" Generator: DocBook XSL Stylesheets v1.71.1 http://docbook.sf.net/ -.\" Date: 01/25/2007 +.\" Date: 08/02/2007 .\" Manual: .\" Source: .\" -.TH "RESMGR.CONF" "5" "01/25/2007" "" "" +.TH "RESMGR.CONF" "5" "08/02/2007" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/resmgr-1.1.0_SVNr139/doc/xml/resmgrd.8 new/resmgr-1.1.0_SVNr143/doc/xml/resmgrd.8 --- old/resmgr-1.1.0_SVNr139/doc/xml/resmgrd.8 2007-01-25 11:23:25.000000000 +0100 +++ new/resmgr-1.1.0_SVNr143/doc/xml/resmgrd.8 2007-08-02 10:54:04.000000000 +0200 @@ -1,11 +1,11 @@ .\" Title: resmgrd .\" Author: .\" Generator: DocBook XSL Stylesheets v1.71.1 http://docbook.sf.net/ -.\" Date: 01/25/2007 +.\" Date: 08/02/2007 .\" Manual: .\" Source: .\" -.TH "RESMGRD" "8" "01/25/2007" "" "" +.TH "RESMGRD" "8" "08/02/2007" "" "" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/resmgr-1.1.0_SVNr139/src/libresmgr.map new/resmgr-1.1.0_SVNr143/src/libresmgr.map --- old/resmgr-1.1.0_SVNr139/src/libresmgr.map 2006-10-27 11:43:02.000000000 +0200 +++ new/resmgr-1.1.0_SVNr143/src/libresmgr.map 2007-08-02 11:10:09.000000000 +0200 @@ -21,7 +21,7 @@ *; }; -RESMGR_PRIVATE { +RESMGR_PRIVATE_1 { global: rsm_close; rsm_close_stream; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/resmgr-1.1.0_SVNr139/src/protocol.h new/resmgr-1.1.0_SVNr143/src/protocol.h --- old/resmgr-1.1.0_SVNr139/src/protocol.h 2006-05-10 14:35:13.000000000 +0200 +++ new/resmgr-1.1.0_SVNr143/src/protocol.h 2007-08-02 11:10:09.000000000 +0200 @@ -38,8 +38,8 @@ unsigned int broadcast : 1, acceptfd : 1, debug : 1; - char user[32]; - char group[32]; + char* user; + char* group; struct res_user *ruser; char buffer[256]; int pos; // position in buffer diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/resmgr-1.1.0_SVNr139/src/svc.c new/resmgr-1.1.0_SVNr143/src/svc.c --- old/resmgr-1.1.0_SVNr139/src/svc.c 2006-08-29 13:18:23.000000000 +0200 +++ new/resmgr-1.1.0_SVNr143/src/svc.c 2007-08-02 11:10:09.000000000 +0200 @@ -62,50 +62,67 @@ struct conn * svc_accept(struct svc *svc) { + int fd; struct conn *conn; char *reason; struct passwd *pwd; struct group *grp; + struct ucred cred; - conn = (struct conn *) calloc(1, sizeof(*conn)); - if (conn == NULL) - return NULL; - conn->fd = -1; - conn->passfd = -1; + conn = NULL; - conn->fd = accept(svc->fd, NULL, 0); - if (conn->fd < 0) + fd = accept(svc->fd, NULL, 0); + if (fd < 0) { + msg_log("accept failed: %m"); goto close; + } - if (fcntl(conn->fd, F_SETFL, O_NONBLOCK) < 0) + if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0) { + msg_log("fcntl O_NONBLOCK failed: %m"); goto close; + } - if (fcntl(conn->fd, F_SETFD, FD_CLOEXEC) < 0) + if (fcntl(fd, F_SETFD, FD_CLOEXEC) < 0) { + msg_log("fcntl FD_CLOEXEC failed: %m"); goto close; + } - if (getpeercred(conn->fd, &conn->cred) < 0) { + if (getpeercred(fd, &cred) < 0) { msg_log("getpeercred failed: %m"); goto close; } reason = "user doesn't exist"; - if ((pwd = getpwuid(conn->cred.uid)) == NULL) + if ((pwd = getpwuid(cred.uid)) == NULL) { + endpwent(); goto reject; - - reason = "user name too long"; - if (strlen(pwd->pw_name) >= sizeof(conn->user)) - goto reject; - strcpy(conn->user, pwd->pw_name); - endpwent(); + } reason = "group doesn't exist"; - if ((grp = getgrgid(conn->cred.gid)) == NULL) + if ((grp = getgrgid(cred.gid)) == NULL) { + endpwent(); + endgrent(); goto reject; + } - reason = "group name too long"; - if (strlen(grp->gr_name) >= sizeof(conn->group)) + reason = "failed to allocate memory for connection"; + conn = (struct conn *) calloc(1, sizeof(*conn) + strlen(pwd->pw_name) + strlen(grp->gr_name) + 2); + if (conn == NULL) { + endpwent(); + endgrent(); goto reject; + } + + conn->fd = fd; + conn->passfd = -1; + conn->cred = cred; + conn->user = (char*)conn + sizeof(*conn); + conn->group = (char*)conn + sizeof(*conn) + strlen(pwd->pw_name) + 1; + + strcpy(conn->user, pwd->pw_name); strcpy(conn->group, grp->gr_name); + + endpwent(); endgrent(); #if 0 @@ -121,9 +138,12 @@ reject: msg_log("rejected connection from uid %d/gid %d: %s", - conn->cred.uid, conn->cred.gid, reason); + cred.uid, cred.gid, reason); close: - rsm_close(conn); + if(conn) + rsm_close(conn); + else if(fd != -1) + close(fd); return NULL; } ++++++ resmgr.init ++++++ --- resmgr/resmgr.init 2006-09-29 11:48:17.000000000 +0200 +++ /mounts/work_src_done/STABLE/resmgr/resmgr.init 2007-08-02 11:19:27.000000000 +0200 @@ -18,6 +18,7 @@ # Default-Start: 2 3 5 # Default-Stop: 0 1 6 # Description: Start resource manager for device file access +# Short-Description: Start resource manager for device file access ### END INIT INFO # Check for missing binaries (stale symlinks should not happen) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org