From: Derrick Brashear Date: Sun, 9 Dec 2007 06:12:09 +0000 (+0000) Subject: STABLE14-aklog-no-dummy-write-on-aix5-20071209 X-Git-Tag: openafs-stable-1_4_7pre1~127 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=5f3d11ed09682b4881c5eb535977802d39d2f58f;p=packages%2Fo%2Fopenafs.git STABLE14-aklog-no-dummy-write-on-aix5-20071209 LICENSE IPL10 don't do the dummy write on aix5. we are better off actually working (cherry picked from commit 40307b60236c8e43321a31ab524ec6edd61cbabf) --- diff --git a/src/aklog/aklog_main.c b/src/aklog/aklog_main.c index d5e665f7d..2eea4c94b 100644 --- a/src/aklog/aklog_main.c +++ b/src/aklog/aklog_main.c @@ -929,11 +929,14 @@ static int auth_to_cell(krb5_context context, char *cell, char *realm) printf("Setting tokens. %s / %s @ %s \n", aclient.name, aclient.instance, aclient.cell ); } +#ifndef AFS_AIX51_ENV /* on AIX 4.1.4 with AFS 3.4a+ if a write is not done before * this routine, it will not add the token. It is not clear what - * is going on here! So we will do the following operation + * is going on here! So we will do the following operation. + * On AIX 5, it causes the parent program to die, so we won't. */ write(2,"",0); /* dummy write */ +#endif #ifndef WINDOWS if ((status = ktc_SetToken(&aserver, &atoken, &aclient, afssetpag))) { fprintf(stderr, diff --git a/src/tsm41/aix_aklog.c b/src/tsm41/aix_aklog.c index dc0320e14..e14b0b5cd 100644 --- a/src/tsm41/aix_aklog.c +++ b/src/tsm41/aix_aklog.c @@ -533,11 +533,14 @@ static int auth_to_cell(krb5_context context, char *cell, char *realm) strcpy(aclient.instance, ""); strncpy(aclient.cell, realm_of_user, MAXKTCREALMLEN - 1); +#ifndef AFS_AIX51_ENV /* on AIX 4.1.4 with AFS 3.4a+ if a write is not done before * this routine, it will not add the token. It is not clear what - * is going on here! So we will do the following operation + * is going on here! So we will do the following operation. + * On AIX 5 this kills our parent. So we won't. */ write(2,"",0); /* dummy write */ +#endif status = ktc_SetToken(&aserver, &atoken, &aclient, afssetpag); return(status);