diff options
author | Jeremy Allison <jra@samba.org> | 2007-12-07 12:26:32 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2007-12-07 12:26:32 -0800 |
commit | acf15ae730c95443681404c76b67ccfca0253d8b (patch) | |
tree | a5db2ab6e2848548b4dd218daab1bc32f93b9cac /source3/lib | |
parent | 590da03ba342ea51561822512322d846bc4faade (diff) | |
download | samba-acf15ae730c95443681404c76b67ccfca0253d8b.tar.gz samba-acf15ae730c95443681404c76b67ccfca0253d8b.tar.bz2 samba-acf15ae730c95443681404c76b67ccfca0253d8b.zip |
Don't build rpctorture anymore - not maintained. Just remove.
Remove all vestiges of pstring (except for smbctool as noted
in previous commit).
Jeremy
(This used to be commit 4c32a22ac50ada3275d2ffba3c1aa08bee7d1549)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/afs.c | 24 | ||||
-rw-r--r-- | source3/lib/system.c | 1 | ||||
-rw-r--r-- | source3/lib/util_str.c | 27 |
3 files changed, 17 insertions, 35 deletions
diff --git a/source3/lib/afs.c b/source3/lib/afs.c index dadd83d513..a815c21907 100644 --- a/source3/lib/afs.c +++ b/source3/lib/afs.c @@ -218,19 +218,29 @@ bool afs_login(connection_struct *conn) bool result; char *ticket_str = NULL; const DOM_SID *user_sid; + TALLOC_CTX *ctx = talloc_tos(); struct ClearToken ct; - pstrcpy(afs_username, lp_afs_username_map()); - standard_sub_advanced(SNUM(conn), conn->user, - conn->connectpath, conn->gid, - get_current_username(), - current_user_info.domain, - afs_username, sizeof(afs_username)); + afs_username = talloc_strdup(ctx, + lp_afs_username_map()); + if (!afs_username) { + return false; + } + + afs_username = talloc_sub_advanced(ctx, + SNUM(conn), conn->user, + conn->connectpath, conn->gid, + get_current_username(), + current_user_info.domain, + afs_username); + if (!afs_username) { + return false; + } user_sid = ¤t_user.nt_user_token->user_sids[0]; afs_username = talloc_string_sub(talloc_tos(), - lp_afs_username_map(), + afs_username, "%s", sid_string_static(user_sid)); if (!afs_username) { diff --git a/source3/lib/system.c b/source3/lib/system.c index 00d1e98b39..86f3a8c4b8 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -2175,7 +2175,6 @@ static ssize_t solaris_list_xattr(int attrdirfd, char *list, size_t size) break; } else { safe_strcpy(list + len, de->d_name, listlen); - pstrcpy(list + len, de->d_name); len += listlen; list[len] = '\0'; ++len; diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c index 0bf4ac83b2..2c0d86ec9a 100644 --- a/source3/lib/util_str.c +++ b/source3/lib/util_str.c @@ -1515,33 +1515,6 @@ char *talloc_all_string_sub(TALLOC_CTX *ctx, false, false, false); } -#if 0 -/** - Splits out the front and back at a separator. -**/ - -static void split_at_last_component(char *path, char *front, char sep, - char *back) -{ - char *p = strrchr_m(path, sep); - - if (p != NULL) - *p = 0; - - if (front != NULL) - pstrcpy(front, path); - - if (p != NULL) { - if (back != NULL) - pstrcpy(back, p+1); - *p = '\\'; - } else { - if (back != NULL) - back[0] = 0; - } -} -#endif - /** Write an octal as a string. **/ |