Sponsored Content
Full Discussion: Masking Password with *'s
Top Forums Programming Masking Password with *'s Post 302482859 by Corona688 on Wednesday 22nd of December 2010 05:45:23 PM
Old 12-22-2010
Quote:
Originally Posted by bigdrock44
for clarity and legibility I was trying to just utilize it as a separate function.
But it is a seperate function. I don't understand.

If you don't care about thread safety, you could use a global variable (or a static, local variable) and return an "int *". But this isn't reccomended because it's not threadsafe. When you look for examples of how it's done in system libraries, you see all sorts of things like sprintf(), fgets() and the like which all take buffers you give them. And the ones which don't, like gets(), are much maligned.
 

10 More Discussions You Might Find Interesting

1. IP Networking

IP Masking

Is it possible for a internal LAN to mask a IP e.g. i have a server ip running the intranet ip being 192.168.0.8 and i want to make that like www.intranet.com is this possible on a internal network ? (1 Reply)
Discussion started by: perleo
1 Replies

2. Shell Programming and Scripting

Masking Content of a String

Hello, I need to know that whether a content of a string can be hidden or masked inside a shell script. My Sample Code is given below <Code> #!/usr/bin/ksh Userid=test DB=temp Passwd=`java Decryption test` # The Above command will get the encryped password for "test" user id and store... (2 Replies)
Discussion started by: maxmave
2 Replies

3. Shell Programming and Scripting

Data Masking

I have a pipe delimited file that I need to 'mask' to before loading to keep some data confidential. I need to maintain the first 4 bytes of certain columns and replace the remaining bytes with an 'x'. I would like to maintain spaces but it's not a requirement. Example, need to mask columns 2... (2 Replies)
Discussion started by: 1superdork
2 Replies

4. Emergency UNIX and Linux Support

Masking of number

BAT:0310:2009-08-0:Y4 :H:D:00003721:03103721.IFH:00138770:05767:00000000001279' EXR:CLP:912.570000' STA:A:9071559:2009-08-10::Wer::Mrs' DEF::531.97:531.97:310221661617::+ABC:BAL:1:N::::5:40.00:0.00:2009-08-10:CN:1111111111109962::3:N:missc :N:PH:00010833:... (5 Replies)
Discussion started by: mad_man12
5 Replies

5. Shell Programming and Scripting

Scripting help/advise on hiding/masking username/password

Hi, I currently have a UNIX script with a function that uses a username and password to connect to the database, retrieve some information and then exit. At the moment, am getting the username and password from a hidden plain text file and permission set to -r--------, i.e. read only to who... (1 Reply)
Discussion started by: newbie_01
1 Replies

6. Shell Programming and Scripting

masking issue

Hi I am facing an issue with the below script which has the below line each field being separated with a tab. I need to mask the 8 and 7th field based on following conditions 1. 8th field is 16 in length and is numerics i will mask the middle 6 digits except the first 6 and last 4. input... (2 Replies)
Discussion started by: mad_man12
2 Replies

7. Shell Programming and Scripting

Masking Password from within a Bash Shell Script

Is there a way to mask the password inside of a script to minimize the impact of a comprimised server? So ssh -o "PasswordAuthentication no" -o "HostbasedAuthentication yes" -l testuser 192.168.3.1 "mysqldump --opt --all-databases -u root -pPassword| gzip" > $backup_dir/mysqldump.gz a... (2 Replies)
Discussion started by: metallica1973
2 Replies

8. Shell Programming and Scripting

Masking algorithm

I have a requirement of masking few specific fields in the UNIX file. The details are as following- File is fixed length file with each record of 250 charater length. 2 fields needs to be masked – the positions are 21:30 and 110:120 The character by character making needs to be done which... (5 Replies)
Discussion started by: n78298
5 Replies

9. UNIX for Dummies Questions & Answers

Masking data

How Can I mask one particular columns using some unix command? (4 Replies)
Discussion started by: dsa
4 Replies

10. Shell Programming and Scripting

Masking with gsub command

My file "test.dat" data as below Requirement is to mask(replace) all english characters with "X" EXCEPT first 7 characters of every line. my command awk '{gsub("]","X")}1' test.dat looks not working properly, Appreciate any suggestion... (6 Replies)
Discussion started by: JSKOBS
6 Replies
NE_SOCK_INIT(3) 						neon API reference						   NE_SOCK_INIT(3)

NAME
ne_sock_init, ne_sock_exit - perform library initialization SYNOPSIS
#include <ne_socket.h> int ne_sock_init(void); void ne_sock_exit(void); DESCRIPTION
In some platforms and configurations, neon may be using some socket or SSL libraries which require global initialization before use. To perform this initialization, the ne_sock_init function must be called before any other library functions are used. Once all use of neon is complete, ne_sock_exit can be called to perform de-initialization of socket or SSL libraries, if necessary. Uses of ne_sock_init and ne_sock_exit are "reference counted"; if N calls to ne_sock_init are made, only the Nth call to ne_sock_exit will have effect. ne_sock_init will set the disposition of the SIGPIPE signal to ignored. No change is made to the SIGPIPE disposition by ne_sock_exit. Both the SSL libraries supported by neon -- OpenSSL and GnuTLS -- require callbacks to be registered to allow thread-safe use of SSL. These callbacks are stored as global variables and so their state persists for as long as the library in question is loaded into the process. If multiple users of the SSL library exist within the process, this can be problematic, particularly if one is dynamically loaded (and may subsequently be unloaded). If neon is configured using the --enable-threadsafe-ssl flag, thread-safe SSL support will be enabled automatically, as covered in the following section. Otherwise, it is not safe to use neon with SSL in a multi-threaded process. The ne_has_support function can be used to determine whether neon is built to enable thread-safety support in the SSL library. Thread-safe SSL with OpenSSL neon follows two simple rules when dealing with the OpenSSL locking callbacks: o ne_sock_init will set thread-safety locking callbacks if and only if no locking callbacks are already registered. o ne_sock_exit will unset the thread-safety locking callbacks if and only if the locking callbacks registered are those registered by ne_sock_init. Applications and libraries should be able to co-operate to ensure that SSL use is always thread-safe if similar rules are always followed. Thread-safe SSL with GnuTLS The cryptography library used by GnuTLS, libgcrypt, only supports an initialization operation to register thread-safety callbacks. ne_sock_init will register the thread-safe locking callbacks on first use; ne_sock_exit cannot unregister them. If multiple users of GnuTLS are present within the process, it is unsafe to dynamically unload neon from the process if neon is configured with thread-safe SSL support enabled (since the callbacks would be left pointing at unmapped memory once neon is unloaded). RETURN VALUE
ne_sock_init returns zero on success, or non-zero on error. If an error occurs, no further use of the neon library should be attempted. SEE ALSO
neon(3), ne_has_support(3) AUTHOR
Joe Orton <neon@lists.manyfish.co.uk> Author. COPYRIGHT
neon 0.30.0 31 July 2013 NE_SOCK_INIT(3)
All times are GMT -4. The time now is 04:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy