~zulcss/ubuntu/lucid/likewise-open/likewise-open-sru

« back to all changes in this revision

Viewing changes to domainjoin/libdomainjoin/src/djpamconf.c

  • Committer: Bazaar Package Importer
  • Author(s): Rick Clark
  • Date: 2008-08-27 08:56:20 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080827085620-5q0f58b9qtog9myq
Tags: 4.1.0.2956-0ubuntu1
* missing-likewise-logo.diff: removed
* fixed copyright notice
* updated Standards-Version to 3.8.0
* removed path from command in prerm
* removed stop in S runlevel

Show diffs side-by-side

added added

removed removed

Lines of Context:
858
858
{
859
859
    CENTERROR ceError = CENTERROR_SUCCESS;
860
860
    DynamicArray openFiles;
861
 
    int lastIndexedFile;
862
 
    int i;
 
861
    int lastIndexedFile = 0;
 
862
    int i = 0;
863
863
    StringBuffer buffer;
864
864
    memset(&openFiles, 0, sizeof(openFiles));
865
865
    BAIL_ON_CENTERIS_ERROR(ceError = CTStringBufferConstruct(&buffer));
1162
1162
    char buffer[256];
1163
1163
    NormalizeModuleName( buffer, module, sizeof(buffer));
1164
1164
 
1165
 
    if(!strcmp(phase, "auth") &&
 
1165
    /* Fix bug 5557. On HP-UX 11.31, libpam_hpsec.so.1 also blocks domain
 
1166
     * users in the account phase. */
 
1167
    if((!strcmp(phase, "auth") || !strcmp(phase, "account")) &&
1166
1168
            !strcmp(control, "required") &&
1167
1169
            !strcmp(buffer, "pam_hpsec"))
1168
1170
    {
1859
1861
                !PamModulePrompts(phase, module) &&
1860
1862
                !PamModuleChecksCaller(phase, module))))
1861
1863
        {
 
1864
            char normalizedService[256];
 
1865
 
1862
1866
            if(state->sawCallerRequirementLine)
1863
1867
            {
1864
1868
                /* This service is protected by something other than a password
1893
1897
             *   system, then gnome-screensaver-smartcard does not have any
1894
1898
             *   auth modules.
1895
1899
             */
1896
 
            if(!strcmp(service, "gdm-autologin"))
1897
 
                goto cleanup;
1898
 
            if(!strcmp(service, "passwd"))
1899
 
                goto cleanup;
1900
 
            if(!strcmp(service, "rsh"))
1901
 
                goto cleanup;
1902
 
            if(!strcmp(service, "shadow"))
1903
 
                goto cleanup;
1904
 
            if(!strcmp(service, "runuser"))
1905
 
                goto cleanup;
1906
 
            if(!strcmp(service, "runuser-l"))
 
1900
            strncpy(normalizedService, service, sizeof(normalizedService));
 
1901
            normalizedService[sizeof(normalizedService) - 1] = '\0';
 
1902
            if(CTStrEndsWith(normalizedService, ".rpmnew"))
 
1903
            {
 
1904
                normalizedService[
 
1905
                    strlen(normalizedService) - strlen(".rpmnew")] = '\0';
 
1906
            }
 
1907
            if(!strcmp(normalizedService, "gdm-autologin"))
 
1908
                goto cleanup;
 
1909
            if(!strcmp(normalizedService, "passwd"))
 
1910
                goto cleanup;
 
1911
            if(!strcmp(normalizedService, "rsh"))
 
1912
                goto cleanup;
 
1913
            if(!strcmp(normalizedService, "shadow"))
 
1914
                goto cleanup;
 
1915
            if(!strcmp(normalizedService, "runuser"))
 
1916
                goto cleanup;
 
1917
            if(!strcmp(normalizedService, "runuser-l"))
1907
1918
                goto cleanup;
1908
1919
            /* I'm not sure if this is a typo or not */
1909
 
            if(!strcmp(service, "kde-np"))
 
1920
            if(!strcmp(normalizedService, "kde-np"))
1910
1921
                goto cleanup;
1911
1922
            /* Centos 5 has kdm-np as part of an optional package */
1912
 
            if(!strcmp(service, "kdm-np"))
1913
 
                goto cleanup;
1914
 
            if(!strcmp(service, "xdm-np"))
1915
 
                goto cleanup;
1916
 
            if(!strcmp(service, "useradd"))
1917
 
                goto cleanup;
1918
 
            if(!strcmp(service, "gnome-screensaver-smartcard"))
 
1923
            if(!strcmp(normalizedService, "kdm-np"))
 
1924
                goto cleanup;
 
1925
            if(!strcmp(normalizedService, "xdm-np"))
 
1926
                goto cleanup;
 
1927
            if(!strcmp(normalizedService, "useradd"))
 
1928
                goto cleanup;
 
1929
            if(!strcmp(normalizedService, "gnome-screensaver-smartcard"))
1919
1930
                goto cleanup;
1920
1931
 
1921
1932
            DJ_LOG_ERROR("Nothing seems to be protecting logins for service %s", service);
2415
2426
 
2416
2427
    if(foundPath == -1)
2417
2428
    {
2418
 
        DJ_LOG_WARNING("Unable to find %s", basename);
 
2429
        DJ_LOG_INFO("Unable to find %s", basename);
2419
2430
        BAIL_ON_CENTERIS_ERROR(ceError = CENTERROR_DOMAINJOIN_PAM_MISSING_MODULE);
2420
2431
    }
2421
2432
    else
2483
2494
 
2484
2495
    for(i = 0; i < serviceCount; i++)
2485
2496
    {
 
2497
        if(!strcmp(services[i], "common-pammount"))
 
2498
        {
 
2499
            /* eeepc has a pam file called common-pammount which is only
 
2500
             * intended to be used as an include file in conjunction with
 
2501
             * other include files. All of our changes should go in
 
2502
             * common-auth instead.
 
2503
             */
 
2504
            DJ_LOG_INFO("Ignoring pam service common-pammount");
 
2505
            continue;
 
2506
        }
2486
2507
        for(j = 0; phases[j] != NULL; j++)
2487
2508
        {
2488
2509
            memset(&state, 0, sizeof(state));
2671
2692
 
2672
2693
CENTERROR
2673
2694
ConfigurePamForADLogin(
2674
 
    PSTR pszShortDomainName
 
2695
    PCSTR pszShortDomainName
2675
2696
    )
2676
2697
{
2677
2698
    CENTERROR ceError = CENTERROR_SUCCESS;