I never call write() but I error check right there, check amount written, and loop if EINTR, EAGAIN if O_NONBLOCK, too, all part of the joys of raw I/O:
Hello
I am executing the following script
nawk 'NR == 1 || substr($0,63,5) ~ /H... / && \
_++ == 2 { fn && close(fn); fn = "part_" ++c; _ = 1 }
{ print > fn }' sample.dat
When i execute as it is it is executing fine. but when i execute the whole script as a single line like below
... (2 Replies)
Hi ,
I m getting an error after executing the script.
My script.
Script is used to find out the date on 8 different machines(mentioned in SERVERNAMES file).
I have added public key to avoid ssh password and ssh without password working fine.
#!/bin/sh
fn_VMFind()
{
Date=`ssh -t... (5 Replies)
Hi friends
NO errors, but when I try to execute the program it gets struck.
Can any one find it out.
#include<stdio.h>
#include<sys/types.h>
#include<sys/mman.h>
#include<stdlib.h>
#include<fcntl.h>
#include<sys/stat.h>
#include<unistd.h>
#include<signal.h>
#include<string.h>
... (0 Replies)
Hi,
I have 2 files temp1.sh and temp2.sh as follows:
===========
temp1.sh
===========
echo "session1"
sh temp2.sh
echo "exit session2 and enter session1"
=================================
=============
temp2.sh
=============
echo "session2"
sh
echo "exit session2"... (5 Replies)
greetings,
i'll try to keep this simple...
i have a script that sets up my environment and creates a command line variable to execute. when i execute the variable i get an error telling me it cannot open one of the files on the command line. the error prints a file name that is definitely... (7 Replies)
I have the following script test.sh owned by dwdev account and group dwdev, the permissions on the script are as follows.
-rw-r-x--- 1 dwdev dwdev 279 Sep 17 13:19 test.sh
Groups:
cat /etc/group | grep dwdev
dwdev:x:704:dwdev
dwgroup:x:725:dwdev
writers:x:726:dwdev
User:
cat /etc/passwd |... (3 Replies)
Hello Friends,
I have written a code for the unisex bathroom which makes a policy that when a woman is in the bathroom only other women may enter, but not men, and vice versa. This program consists of four functions which a user defines but these functions are not properly working while... (4 Replies)
Hi,
I wrote this script to test if the output for DIR1 and DIR2 comes out as I want :
#!/bin/bash
DAY=$(date +%d)
MONTH=$(date +%b)
YEAR=$(date +%Y)
DIR1=$($MONTH$YEAR"_Blast_BC01")
DIR2=$($MONTH$YEAR"_Blast_BC15")
echo $DIR1
echo $DIR2
This is the output I want for echo $DIR1 ... (12 Replies)
Discussion started by: anaigini45
12 Replies
LEARN ABOUT FREEBSD
krb5_ccache_intro
krb5_ccache_intro(3) HeimdalKerberos5library krb5_ccache_intro(3)NAME
krb5_ccache_intro - The credential cache functions
Kerberos credential caches
krb5_ccache structure holds a Kerberos credential cache.
Heimdal support the follow types of credential caches:
o SCC Store the credential in a database
o FILE Store the credential in memory
o MEMORY Store the credential in memory
o API A credential cache server based solution for Mac OS X
o KCM A credential cache server based solution for all platforms
Example
This is a minimalistic version of klist:
#include <krb5.h>
int
main (int argc, char **argv)
{
krb5_context context;
krb5_cc_cursor cursor;
krb5_error_code ret;
krb5_ccache id;
krb5_creds creds;
if (krb5_init_context (&context) != 0)
errx(1, 'krb5_context');
ret = krb5_cc_default (context, &id);
if (ret)
krb5_err(context, 1, ret, 'krb5_cc_default');
ret = krb5_cc_start_seq_get(context, id, &cursor);
if (ret)
krb5_err(context, 1, ret, 'krb5_cc_start_seq_get');
while((ret = krb5_cc_next_cred(context, id, &cursor, &creds)) == 0){
char *principal;
krb5_unparse_name(context, creds.server, &principal);
printf('principal: %s
', principal);
free(principal);
krb5_free_cred_contents (context, &creds);
}
ret = krb5_cc_end_seq_get(context, id, &cursor);
if (ret)
krb5_err(context, 1, ret, 'krb5_cc_end_seq_get');
krb5_cc_close(context, id);
krb5_free_context(context);
return 0;
}
Version 1.5.2 11 Jan 2012 krb5_ccache_intro(3)