[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: domain_aware_getpwnam - remaining issues?



On Mon, Nov 10, 2003 at 02:29:17PM +0300, Eugene Crosser wrote:
> Matti,
> 
> I have two things left unclear with the diff that you applied:
> 
> 1. Is this right that this part was dropped? (maybe it is, I just don't
> understand it well enough)

Hazards of manual application of patches..  My bad.

> --- proto/cf/aliases.cf 6 Nov 2003 23:29:24 -0000       1.49
> +++ proto/cf/aliases.cf 10 Nov 2003 11:16:55 -0000
> @@ -751,7 +751,7 @@
>         # local user with no alias and no .forward file
>                                                                                 
>         if [ -n "$pobox" ] ; then
> -               priv=$(login2uid "$user")
> +               priv=$(login2uid "$sysuser")
>                 returns (((local "pob:$user" "$pobox$plustail$domain" $(newattribute $attr privilege $priv))))
>         fi
> 
> 2. I think that this static should be initialized here because later on,
> environment is checked only if the value of the variable is zero.  There
> is no need for that check, I just left it to make the code similar to
> another place, and to it easier to implement a command-line option if
> someone wants to do it.  If there is no initialization, then the code
> later on (line 643) needs to be modified.

Uninitalized variables will go to BSS, which C runtime will clear before
calling  main().    In C this should be considered "given".
In some situations it has lots of meaning by (not so small a feat) of
reducing program image size.   I really should clean ZMailer in this
regard.

Hmm..  And verify that my friend who ported Z to Cygwin doesn't
find traps blowing this rather fundamental C rule out of the water...

ZMailer does compile at Cygwin environment, it will even run somewhat
in it.  But there are misbehaviours, and UNIXy  use of  fork() to
split existing process into two isn't, exactly, supported thing
under windows...


> --- transports/mailbox/mailbox.c        6 Nov 2003 23:29:24 -0000       1.112
> +++ transports/mailbox/mailbox.c        10 Nov 2003 11:16:56 -0000
> @@ -373,7 +373,7 @@
>  #endif
>  int    D_alloc = 0;
>                                                            
> -static int domain_aware_getpwnam;
> +static int domain_aware_getpwnam = 0;
>                                                      
>  static int zsfsetfd(fp, fd)
>       Sfio_t *fp;
-- 
/Matti Aarnio	<mea@nic.funet.fi>
-
To unsubscribe from this list: send the line "unsubscribe zmailer" in
the body of a message to majordomo@nic.funet.fi