diff options
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/cifsacl.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c index dd8d3df74298..9adcdb5a1001 100644 --- a/fs/cifs/cifsacl.c +++ b/fs/cifs/cifsacl.c | |||
@@ -199,27 +199,24 @@ static void | |||
199 | sid_to_str(struct cifs_sid *sidptr, char *sidstr) | 199 | sid_to_str(struct cifs_sid *sidptr, char *sidstr) |
200 | { | 200 | { |
201 | int i; | 201 | int i; |
202 | unsigned long saval; | 202 | unsigned int saval; |
203 | char *strptr; | 203 | char *strptr; |
204 | 204 | ||
205 | strptr = sidstr; | 205 | strptr = sidstr; |
206 | 206 | ||
207 | sprintf(strptr, "%s", "S"); | 207 | sprintf(strptr, "S-%hhu", sidptr->revision); |
208 | strptr = sidstr + strlen(sidstr); | ||
209 | |||
210 | sprintf(strptr, "-%d", sidptr->revision); | ||
211 | strptr = sidstr + strlen(sidstr); | 208 | strptr = sidstr + strlen(sidstr); |
212 | 209 | ||
213 | for (i = 0; i < NUM_AUTHS; ++i) { | 210 | for (i = 0; i < NUM_AUTHS; ++i) { |
214 | if (sidptr->authority[i]) { | 211 | if (sidptr->authority[i]) { |
215 | sprintf(strptr, "-%d", sidptr->authority[i]); | 212 | sprintf(strptr, "-%hhu", sidptr->authority[i]); |
216 | strptr = sidstr + strlen(sidstr); | 213 | strptr = sidstr + strlen(sidstr); |
217 | } | 214 | } |
218 | } | 215 | } |
219 | 216 | ||
220 | for (i = 0; i < sidptr->num_subauth; ++i) { | 217 | for (i = 0; i < sidptr->num_subauth; ++i) { |
221 | saval = le32_to_cpu(sidptr->sub_auth[i]); | 218 | saval = le32_to_cpu(sidptr->sub_auth[i]); |
222 | sprintf(strptr, "-%ld", saval); | 219 | sprintf(strptr, "-%u", saval); |
223 | strptr = sidstr + strlen(sidstr); | 220 | strptr = sidstr + strlen(sidstr); |
224 | } | 221 | } |
225 | } | 222 | } |