IWETHEY v. 0.3.0 | TODO
1,095 registered users | 1 active user | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New I keep getting a problem here:
This is driving me... well okay, furthering my insanity. I am trying to compile MIT Kerberos5 1.3.3 in krb5-1.3.3/src/appl/bsd/krshd.c. This is my last piece I need to finish updating a project to be able to work.

I don't see the rror it is talking about. I have marked line 632. I just don't see it.

krshd.c: In function `doit':
krshd.c:632: warning: assignment makes pointer from integer without a cast
krshd.c:633: dereferencing pointer to incomplete type

void doit(f, fromp)\n     int f;\n     struct sockaddr *fromp;\n{\n    char *cp;\n#ifdef KERBEROS\n    krb5_error_code status;\n#endif\n    int valid_checksum;\n    int cnt;\n    char *crypt();\n    struct passwd *pwd;\n    char *path;\n#ifdef CRAY\n#ifndef NO_UDB\n    struct udb    *ue;\n    struct udb ue_static;\n    extern struct udb *getudbnam();\n#endif\n    extern struct passwd *getpwnam(), *getpwuid();\n    static int      jid;\n    int error();\n    int paddr;\n    struct  nal nal;\n    int     nal_error;\n    struct usrv usrv;\n    struct  sysv sysv;\n    char    *makejtmp(), *jtmpnam = 0;\n    int packet_level;               /* Packet classification level */\n    long packet_compart;            /* Packet compartments */\n#endif  /* CRAY */\n\n    int s = -1;\n    char hostname[NI_MAXHOST];\n    char *sane_host;\n    char hostaddra[NI_MAXHOST];\n    int aierr;\n    short port;\n    int pv[2], pw[2], px[2], cc;\n    fd_set ready, readfrom;\n    char buf[RCMD_BUFSIZ], sig;\n    struct sockaddr_storage localaddr;\n#ifdef POSIX_SIGNALS\n    struct sigaction sa;\n#endif\n\n#ifdef IP_TOS\n/* solaris has IP_TOS, but only IPTOS_* values */\n#ifdef HAVE_GETTOSBYNAME\n    struct tosent *tp;\n\n\n    if ((tp = gettosbyname("interactive", "tcp")) &&\n        (setsockopt(f, IPPROTO_IP, IP_TOS, &tp->t_tos, sizeof(int)) < 0))\n#ifdef  TOS_WARN\n      syslog(LOG_NOTICE, "setsockopt (IP_TOS): %m");\n#else\n    ;       /* silently ignore TOS errors in 6E */\n#endif\n#endif\n#endif /* IP_TOS */\n\n    {\n        socklen_t sin_len = sizeof (localaddr);\n        if (getsockname(f, (struct sockaddr*)&localaddr, &sin_len) < 0) { /* line 632 */\n            perror("getsockname");\n            exit(1);\n        }\n    }
--
[link|mailto:greg@gregfolkert.net|greg],
[link|http://www.iwethey.org/ed_curry|REMEMBER ED CURRY!] @ iwethey

Heard near the SCOG employee entry/exit way:

  Security: We got another Mass Exodus Doorway Jam.
New WAG time
Making guesses in a language that I don't regularly use and never learned, how unwise can I get? :-/

My less likely guess is that getsockname expects its first argument to be a pointer of some kind. You're passing in an int, and it is complaining about an int being cast to a pointer.

More likely, I'm finding it very odd that you're trying to get the address of sin_len when that doesn't look much like a pointer to me.

Cheers,
Ben
To deny the indirect purchaser, who in this case is the ultimate purchaser, the right to seek relief from unlawful conduct, would essentially remove the word consumer from the Consumer Protection Act
- [link|http://www.techworld.com/opsys/news/index.cfm?NewsID=1246&Page=1&pagePos=20|Nebraska Supreme Court]
Expand Edited by ben_tilly July 14, 2004, 02:35:27 AM EDT
New More WAG
getsockname returns the actual length of the address via sin_len. That is why it is called that way (sending it the address of a local variable).

My contribution to WAGing is that getsockname's 3rd parameter was not always socklen_t * . It is/was int * on some (older?) platforms.

Are you porting to an odd platform?
What is the prototype for getsockname on your platform?
Is Autoconf screwing up its detection of getsockname's prototype?

That and line 632 was " if ((tp = gettosbyname("interactive", "tcp")) && "
in my copy of the source but I don't know if you've otherwise edited it.
--
Chris Altmann
New Not a weird platform.
Just a 4 processor machine with RHEL AS30. Has 10GB of Memory.

I am guessing it is something I can't get around.

I'll have to wing it. I tossed and turned for quite a while.
--
[link|mailto:greg@gregfolkert.net|greg],
[link|http://www.iwethey.org/ed_curry|REMEMBER ED CURRY!] @ iwethey

Heard near the SCOG employee entry/exit way:

  Security: We got another Mass Exodus Doorway Jam.
New Line Number
Are you sure that line number is correct or have you edited the file in question? The only reason I ask is that the source I grabbed off the MIT site has line 632 and 633 as
\nif ((tp = gettosbyname("interactive", "tcp")) &&\n        (setsockopt(f, IPPROTO_IP, IP_TOS, &tp->t_tos, sizeof(int)) < 0))\n

If that code was somehow getting ifdeffed in (I don't think it should on Linux) then the two messages you list could make sense.

The warning could result from the compiler not having a prototype for gettosbyname and defaulting to returning int, which then triggers the warning of trying to convert the int result to a pointer (tp)

The error could then be explained by the derefencing of the tp pointer in the setsockopt call before the struct type had been fully specified (the struct tosent *tp; line would in effect be a forward declaration that never got completed before it was used because the compiler doesn't know what "struct tosent" is).



--
Chris Altmann
New Something stinks...
This was supposed to be simple.

Here is what I am looking at, this was a src.rpm packaged set of source. It was signed and validated proper.

I guess, I'll have to ask some questions. I don't believe the, the person I got this from is dishonest, as he actually is a member of the FOSS Community.

I'll be reporting back when I find out everything.
--
[link|mailto:greg@gregfolkert.net|greg],
[link|http://www.iwethey.org/ed_curry|REMEMBER ED CURRY!] @ iwethey
No matter how much Microsoft supporters whine about how Linux and other operating systems have just as many bugs as their operating systems do, the bottom line is that the serious, gut-wrenching problems happen on Windows, not on Linux, not on Mac OS. -- [link|http://www.eweek.com/article2/0,1759,1622086,00.asp|source]
New 6 more # signs out to do it
Anchorage AK: House for sale 3 bed 1 bath 1440 sq feet huge lot near Cheney Lake 175K FSBO 813.273.3518
I wondered what Darwinian moment had to effect itself before we devolved from children flying paper flags in the sky to half formed creatures thundering in a wall of horns down the road to Roncevaux. James Lee Burke
questions, help? [link|mailto:pappas@catholic.org|email pappas at catholic.org]
New LRPD!
"This is driving me...well, furthering my insanity."
-drl
New Here's my guess:
the getsockname() function call takes a SOCKET as its first parameter:
\nint getsockname(\n  SOCKET s,                    \n  struct sockaddr FAR *name,  \n  int FAR *namelen            \n);\n\n
(The above taken from the WinSock documentation)

A SOCKET is a "handle" to a socket object. How this "handle" is implemented is implementation-dependent, but on Windoze platforms, handles are defined as pointers. Indeed, the definition of a SOCKET in winsock.h is:
\ntypedef UINT_PTR        SOCKET;\n


where a UINT_PTR is a pointer to an unsigned int.

So what you're doing is implicitly casting an int to a pointer type, and the compiler is (rightly) bitching about it.

To fix it, define the parameter f as type SOCKET instead of type int, or explicitly cast f to the SOCKET type.
<rant>
(NOTE: I don't give a flying shit if these yahoos are from the mighty MIT, passing a socket handle as an int instead of as a SOCKET is really bad coding!. If this is what MIT is pumping out, then it's no wonder why the Indians are eating our lunch!)
</rant>
jb4
shrub\ufffdbish (Am., from shrub + rubbish, after the derisive name for America's 43 president; 2003) n. 1. a form of nonsensical political doubletalk wherein the speaker attempts to defend the indefensible by lying, obfuscation, or otherwise misstating the facts; GIBBERISH. 2. any of a collection of utterances from America's putative 43rd president. cf. BULLSHIT

New Could you post preprocessed source?
It may be a better clue
--

"...was poorly, lugubrious and intoxicated."

-- Patrick O'Brian, "Master and Commander"
New I actually...
switched to the official source of Kerberos v1.3.4 and all problems went away...

I guess diff'd and patch'd sources only get you || this far.
--
[link|mailto:greg@gregfolkert.net|greg],
[link|http://www.iwethey.org/ed_curry|REMEMBER ED CURRY!] @ iwethey
No matter how much Microsoft supporters whine about how Linux and other operating systems have just as many bugs as their operating systems do, the bottom line is that the serious, gut-wrenching problems happen on Windows, not on Linux, not on Mac OS. -- [link|http://www.eweek.com/article2/0,1759,1622086,00.asp|source]
Here is an example: [link|http://www.greymagic.com/security/advisories/gm001-ie/|Executing arbitrary commands without Active Scripting or ActiveX when using Windows]
     I keep getting a problem here: - (folkert) - (10)
         WAG time - (ben_tilly) - (4)
             More WAG - (altmann) - (3)
                 Not a weird platform. - (folkert) - (2)
                     Line Number - (altmann) - (1)
                         Something stinks... - (folkert)
         6 more # signs out to do it -NT - (boxley)
         LRPD! - (deSitter)
         Here's my guess: - (jb4)
         Could you post preprocessed source? - (Arkadiy)
         I actually... - (folkert)

And to the tune of a billion dollars I supplied to the DOE some tasty little nuggets of alien technology... and as one might expect I've been HARASSED for YEARS!
64 ms