Re: Fedora 9 + CIFS issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for the tip on strlcpy.
> 
> My solution was to ensure that my credentials file does not terminate with a new-line character.  I used a hex editor to delete the final new-line character that vi sticks in there, and I was able to use my credentials file at that point.
> 
> However, it looks like the same thing is happening in the domain parameter, so if you include both a domain and a password, you need to have a new-line character to separate them, and I am not sure how to workaround that.
Here are a couple of alternative workarounds if you need to supply both domain and username in the credentials file. The trick is to help strlcpy to terminate the string, by explicitly inserting a NULL character.

1) If using a hex-editor insert a NULL character (00) just before the newline on each row.

2) or wash/fix an existing credentials file like this:

cat credentials_file | tr -d ' t' | awk -- '{printf "%sn", $0}' > new_credetials_file

This also take care of the space problem, since any spaces (or tabs) are deleted.

3) or create a brand new credentials file like this:

echo -en "domain=xxxnusername=xxxnpassword=xxxn" > credentials_file

Cheers
/S-G


-- 
This is an email sent via The Fedora Community Portal https://fcp.surfsite.org
https://fcp.surfsite.org/modules/newbb/viewtopic.php?post_id=268232&topic_id=56359&forum=10#forumpost268232
If you think, this is spam, please report this to webmaster@xxxxxxxxxxxxxxxx and/or blame sgb@xxxxxxxxxxxxxxx

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux