~ubuntu-branches/ubuntu/jaunty/nspr/jaunty-security

« back to all changes in this revision

Viewing changes to mozilla/nsprpub/pr/src/md/windows/ntsec.c

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson
  • Date: 2010-05-18 12:29:43 UTC
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: james.westby@ubuntu.com-20100518122943-y1nr2oy8jrw1fg04
Tags: upstream-4.8
ImportĀ upstreamĀ versionĀ 4.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
 */
70
70
void _PR_NT_InitSids(void)
71
71
{
 
72
#ifdef WINCE /* not supported */
 
73
    return;
 
74
#else
72
75
    SID_IDENTIFIER_AUTHORITY SIDAuthWorld = SECURITY_WORLD_SID_AUTHORITY;
73
76
    HANDLE hToken = NULL; /* initialized to an arbitrary value to
74
77
                           * silence a Purify UMR warning */
75
 
    UCHAR infoBuffer[1024];
 
78
    PSID infoBuffer[1024/sizeof(PSID)]; /* defined as an array of PSIDs
 
79
                                         * to force proper alignment */
76
80
    PTOKEN_OWNER pTokenOwner = (PTOKEN_OWNER) infoBuffer;
77
81
    PTOKEN_PRIMARY_GROUP pTokenPrimaryGroup
78
82
            = (PTOKEN_PRIMARY_GROUP) infoBuffer;
128
132
            0, 0, 0, 0, 0, 0, 0,
129
133
            &_pr_nt_sids.everyone);
130
134
    PR_ASSERT(rv != 0);
 
135
#endif
131
136
}
132
137
 
133
138
/*
139
144
void
140
145
_PR_NT_FreeSids(void)
141
146
{
 
147
#ifdef WINCE
 
148
    return;
 
149
#else
142
150
    if (_pr_nt_sids.owner) {
143
151
        PR_Free(_pr_nt_sids.owner);
144
152
    }
148
156
    if (_pr_nt_sids.everyone) {
149
157
        FreeSid(_pr_nt_sids.everyone);
150
158
    }
 
159
#endif
151
160
}
152
161
 
153
162
/*
168
177
    PSECURITY_DESCRIPTOR *resultSD,
169
178
    PACL *resultACL)
170
179
{
 
180
#ifdef WINCE
 
181
    PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
 
182
    return PR_FAILURE;
 
183
#else
171
184
    PSECURITY_DESCRIPTOR pSD = NULL;
172
185
    PACL pACL = NULL;
173
186
    DWORD cbACL;  /* size of ACL */
261
274
        PR_Free(pACL);
262
275
    }
263
276
    return PR_FAILURE;
 
277
#endif
264
278
}
265
279
 
266
280
/*