ports/51663: [PATCH] vpopmail-stable fix for using vmoduser -x any_dom
Rui Lopes
rui at ruilopes.com
Thu May 1 19:50:19 UTC 2003
>Number: 51663
>Category: ports
>Synopsis: [PATCH] vpopmail-stable fix for using vmoduser -x any_dom
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu May 01 12:50:17 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Rui Lopes
>Release: FreeBSD 5.0-RELEASE-p2 i386
>Organization:
>Environment:
System: FreeBSD disty 5.0-RELEASE-p2 FreeBSD 5.0-RELEASE-p2 #7: Sun Feb 23 17:54:25 WET 2003 root at disty:/usr/obj/usr/src/sys/DEBUGGER i386
>Description:
I needed to set some account flags on a _entire_ domain but vmoduser refused to work:
# /usr/local/vpopmail/bin/vmoduser -x ruilopes.com
Error: null pointer
I have send this patch to vchkpw at inter7.com on 17 April but for some reason I
didn't get any anwser..
>How-To-Repeat:
# /usr/local/vpopmail/bin/vmoduser -x any_dom
you will get a "Error: null pointer" from program.
>Fix:
Apply patch to vpopmail 5.2.1
--- patch-vcdb.c begins here ---
--- vpop_src_original/vpopmail-5.2.1/vcdb.c Wed Jan 23 15:03:01 2002
+++ vpop_src/vpopmail-5.2.1/vcdb.c Thu Apr 17 15:19:15 2003
@@ -597,7 +597,8 @@
}
vcdb_strip_char( inpw->pw_gecos );
#ifndef CLEAR_PASS
- vcdb_strip_char( inpw->pw_clear_passwd );
+ if (inpw->pw_clear_passwd)
+ vcdb_strip_char( inpw->pw_clear_passwd );
#endif
while (fgets(tmpbuf1,MAX_BUFF,fs2)!=NULL){
--- patch-vcdb.c ends here ---
--- patch-vpopmail.c begins here ---
--- vpop_src_original/vpopmail-5.2.1/vpopmail.c Sat May 18 07:25:49 2002
+++ vpop_src/vpopmail-5.2.1/vpopmail.c Thu Apr 17 16:05:22 2003
@@ -2302,7 +2302,9 @@
if ( inpw->pw_gecos == NULL ) return(VA_NULL_POINTER);
if ( inpw->pw_dir == NULL ) return(VA_NULL_POINTER);
if ( inpw->pw_shell == NULL ) return(VA_NULL_POINTER);
+#ifdef CLEAR_PASS
if ( inpw->pw_clear_passwd == NULL ) return(VA_NULL_POINTER);
+#endif
if ( strlen(inpw->pw_name) > MAX_PW_NAME ) return(VA_USER_NAME_TOO_LONG);
if ( strlen(inpw->pw_name) == 1 ) return(VA_ILLEGAL_USERNAME);
@@ -2311,8 +2313,10 @@
if ( strlen(inpw->pw_gecos) > MAX_PW_PASS ) return(VA_GECOS_TOO_LONG);
if ( strlen(inpw->pw_dir) > MAX_PW_DIR ) return(VA_DIR_TOO_LONG);
if ( strlen(inpw->pw_shell) > MAX_PW_QUOTA ) return(VA_QUOTA_TOO_LONG);
+#ifdef CLEAR_PASS
if ( strlen(inpw->pw_clear_passwd) > MAX_PW_CLEAR_PASSWD )
return(VA_CLEAR_PASSWD_TOO_LONG);
+#endif
return(VA_SUCCESS);
}
--- patch-vpopmail.c ends here ---
--- patch-vuserinfo.c begins here ---
--- vpop_src_original/vpopmail-5.2.1/vuserinfo.c Fri Feb 1 18:04:47 2002
+++ vpop_src/vpopmail-5.2.1/vuserinfo.c Thu Apr 17 14:01:06 2003
@@ -228,7 +228,9 @@
if ( DisplayAll ) {
printf("name: %s\n", mypw->pw_name);
printf("passwd: %s\n", mypw->pw_passwd);
+#ifdef CLEAR_PASS
printf("clear passwd: %s\n", mypw->pw_clear_passwd);
+#endif
printf("uid: %lu\n", (long unsigned)mypw->pw_uid);
printf("gid: %lu\n", (long unsigned)mypw->pw_gid);
--- patch-vuserinfo.c ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list